Man page - iv_timer_registered(3)
Packages contas this manual
- iv_fd_pump_init(3)
- iv_timer_register(3)
- iv_timer_unregister(3)
- iv_fd_pump(3)
- iv_wait_interest_register(3)
- iv_event_raw_post(3)
- iv_timer_registered(3)
- iv_signal_unregister(3)
- iv_thread(3)
- iv_signal(3)
- iv_inited(3)
- iv_tls_user_ptr(3)
- iv_event_raw_unregister(3)
- iv_popen_request_submit(3)
- iv_fd_set_handler_out(3)
- ivykis(3)
- iv_tls(3)
- iv_fd_unregister(3)
- iv_examples(3)
- iv_wait_interest_register_spawn(3)
- iv_invalidate_now(3)
- iv_work_pool_create(3)
- iv_inotify_watch_register(3)
- iv_inotify(3)
- iv_validate_now(3)
- iv_task_registered(3)
- iv_fatal(3)
- iv_event_raw_register(3)
- iv_thread_create(3)
- iv_quit(3)
- iv_task(3)
- iv_task_register(3)
- iv_fd_set_handler_in(3)
- iv_set_fatal_msg_handler(3)
- iv_event_post(3)
- iv_deinit(3)
- iv_init(3)
- iv_event_register(3)
- iv_fd(3)
- iv_fd_registered(3)
- iv_work_pool_submit_work(3)
- iv_time(3)
- iv_inotify_watch_unregister(3)
- iv_event_raw(3)
- iv_fd_pump_destroy(3)
- iv_fd_register_try(3)
- iv_signal_register(3)
- iv_inotify_unregister(3)
- iv_event(3)
- iv_thread_set_debug_state(3)
- iv_work_pool_put(3)
- iv_fd_pump_is_done(3)
- iv_fd_register(3)
- iv_inotify_register(3)
- iv_task_unregister(3)
- iv_timer(3)
- iv_event_unregister(3)
- iv_wait(3)
- iv_fd_pump_pump(3)
- iv_work(3)
- iv_fd_set_handler_err(3)
- iv_tls_user_register(3)
- iv_popen(3)
- iv_main(3)
- iv_wait_interest_unregister(3)
- iv_popen_request_close(3)
apt-get install libivykis-dev
Manual
| iv_timer(3) | ivykis programmer's manual | iv_timer(3) |
NAME
iv_timer_register, iv_timer_unregister, iv_timer_registered - deal with ivykis timers
SYNOPSIS
#include <iv.h>
struct iv_timer {
struct timespec expires;
void *cookie;
void (*handler)(void *);
};
void IV_TIMER_INIT(struct iv_timer *timer);
void iv_timer_register(struct iv_timer *timer);
void iv_timer_unregister(struct iv_timer *timer);
int iv_timer_registered(const struct iv_timer
*timer);
DESCRIPTION
The functions iv_timer_register and iv_timer_unregister register, respectively unregister, a timer with the current thread's ivykis event loop. iv_timer_registered on a timer returns true if that timer is currently registered with ivykis.
When a timer that is registered becomes 'ready', due to the current system clock value becoming greater than or equal to the timer's ->expires member field, the callback function specified by ->handler is called in the thread that the timer was registered in, with ->cookie as its first and sole argument. When this happens, the timer is transparently unregistered.
The application is allowed to change the ->cookie and ->handler members at any time. The application is not allowed to change the ->expires member while the timer is registered.
A given struct iv_timer can only be registered in one thread at a time, and a timer can only be unregistered in the thread that it was registered from.
There is no limit on the number of timers registered at once.
See iv_examples(3) for programming examples.
SEE ALSO
ivykis(3), iv_examples(3)
| 2010-08-15 | ivykis |