
Go to the source code of this file.
Data Structures | |
| struct | sr_timer |
Defines | |
| #define | TIMER_PROC_INIT_FLAG (1<<0) |
Typedefs | |
| typedef void( | timer_function )(unsigned int ticks, void *param) |
| typedef unsigned long long | utime_t |
| typedef void( | utimer_function )(utime_t uticks, void *param) |
Functions | |
| int | count_timer_procs (void) |
| Counts the timer processes that needs to be created. | |
| void | destroy_timer (void) |
| Free timers. | |
| unsigned int | get_ticks (void) |
| Return the actual tick count. | |
| utime_t | get_uticks (void) |
| Return the actual utick count. | |
| int | init_timer (void) |
| Initialize the timers, allocate jiffies and ujiffies in shared memory. | |
| int | register_timer (timer_function f, void *param, unsigned int interval) |
| register a periodic timer; | |
| int | register_timer_process (timer_function f, void *param, unsigned int interval, unsigned int flags) |
| register a timer process | |
| int | register_utimer (utimer_function f, void *param, unsigned int interval) |
| register a periodic utimer; | |
| int | start_timer_processes (void) |
| Start timer processes. | |
Definition in file timer.h.
| #define TIMER_PROC_INIT_FLAG (1<<0) |
Definition at line 64 of file timer.h.
Referenced by init_timer(), mod_init(), and start_timer_processes().
| typedef void( timer_function)(unsigned int ticks, void *param) |
| typedef unsigned long long utime_t |
| typedef void( utimer_function)(utime_t uticks, void *param) |
| int count_timer_procs | ( | void | ) |
Counts the timer processes that needs to be created.
Definition at line 415 of file timer.c.
References sr_timer_process::next, NULL, sr_timer_process::timer_list, and sr_timer_process::utimer_list.
Referenced by init_multi_proc_support().
| void destroy_timer | ( | void | ) |
| unsigned int get_ticks | ( | void | ) |
Return the actual tick count.
Definition at line 235 of file timer.c.
References jiffies, and LM_CRIT.
Referenced by add_list_to_head(), build_sipping(), clean_routine(), dialog_update_db(), get_time_ser(), insert(), insert_dlg_timer(), load_dialog_info_from_db(), pike_check_req(), remove_timeout(), reserve_nonce_index(), rtpp_test(), schedule_to_kill(), select_rtpp_node(), send_rtpp_command(), set_1timer(), set_gettime_function(), set_timer(), sl_filter_ACK(), sl_send_reply_helper(), sl_startup(), tls_tcpconn_init(), update_dialog_dbinfo(), update_dlg_timer(), xj_jcon_pool_add_jmsg(), xj_jcon_set_attrs(), xj_jcon_update(), xj_worker_check_qmsg(), and xj_worker_process().
| utime_t get_uticks | ( | void | ) |
Return the actual utick count.
Definition at line 248 of file timer.c.
References LM_CRIT, and ujiffies.
Referenced by set_1timer(), and set_timer().
| int init_timer | ( | void | ) |
Initialize the timers, allocate jiffies and ujiffies in shared memory.
Definition at line 99 of file timer.c.
References E_CFG, E_OUT_OF_MEM, jiffies, LM_CRIT, LM_ERR, new_timer_process_list(), NULL, shm_malloc(), TIMER_PROC_INIT_FLAG, TIMER_TICK, ujiffies, and UTIMER_TICK.
Referenced by main().
| int register_timer | ( | timer_function | f, | |
| void * | param, | |||
| unsigned int | interval | |||
| ) |
register a periodic timer;
Definition at line 173 of file timer.c.
References E_OUT_OF_MEM, sr_timer::id, new_sr_timer(), sr_timer::next, NULL, and sr_timer_process::timer_list.
Referenced by init_black_lists(), init_dlg_db(), initialize_kill(), mod_init(), and pike_init().
| int register_timer_process | ( | timer_function | f, | |
| void * | param, | |||
| unsigned int | interval, | |||
| unsigned int | flags | |||
| ) |
register a timer process
Definition at line 211 of file timer.c.
References E_OUT_OF_MEM, sr_timer::id, new_sr_timer(), new_timer_process_list(), sr_timer::next, NULL, and sr_timer_process::timer_list.
Referenced by mod_init().
| int register_utimer | ( | utimer_function | f, | |
| void * | param, | |||
| unsigned int | interval | |||
| ) |
register a periodic utimer;
Definition at line 193 of file timer.c.
References E_OUT_OF_MEM, sr_timer::id, new_sr_timer(), sr_timer::next, NULL, and sr_timer_process::utimer_list.
Referenced by mod_init().
| int start_timer_processes | ( | void | ) |
Start timer processes.
Definition at line 380 of file timer.c.
References sr_timer_process::flags, init_child(), internal_fork(), LM_CRIT, LM_ERR, sr_timer_process::next, NULL, pid, PROC_TIMER, run_timer_process(), sr_timer_process::timer_list, TIMER_PROC_INIT_FLAG, and sr_timer_process::utimer_list.
Referenced by main_loop().
1.5.6