timerfd timing interface
More...
Go to the source code of this file.
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Timerfd Timing Interface" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_TIMING, } |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
static struct ast_timing_interface | timerfd_timing |
|
static void * | timing_funcs_handle |
|
◆ TIMERFD_MAX_RATE
#define TIMERFD_MAX_RATE 1000 |
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ timer_destroy()
static void timer_destroy |
( |
void * |
obj | ) |
|
|
static |
◆ timerfd_timer_ack()
static int timerfd_timer_ack |
( |
void * |
data, |
|
|
unsigned int |
quantity |
|
) |
| |
|
static |
Definition at line 127 of file res_timing_timerfd.c.
References ao2_lock, ao2_unlock, ast_debug, ast_log, errno, timerfd_timer::fd, LOG_ERROR, and timer.
130 uint64_t expirations;
137 struct itimerspec timer_status;
139 if (timerfd_gettime(timer->
fd, &timer_status)) {
146 if (timer_status.it_value.tv_sec == 0 && timer_status.it_value.tv_nsec == 0) {
147 ast_debug(1,
"Avoiding read on disarmed timerfd %d\n", timer->
fd);
152 read_result = read(timer->
fd, &expirations,
sizeof(expirations));
153 if (read_result == -1) {
162 }
while (read_result !=
sizeof(expirations));
166 if (expirations != quantity) {
167 ast_debug(2,
"Expected to acknowledge %u ticks but got %llu instead\n", quantity, (
unsigned long long) expirations);
#define ast_debug(level,...)
Log a DEBUG message.
static struct ast_timer * timer
◆ timerfd_timer_close()
static void timerfd_timer_close |
( |
void * |
data | ) |
|
|
static |
◆ timerfd_timer_disable_continuous()
static int timerfd_timer_disable_continuous |
( |
void * |
data | ) |
|
|
static |
◆ timerfd_timer_enable_continuous()
static int timerfd_timer_enable_continuous |
( |
void * |
data | ) |
|
|
static |
◆ timerfd_timer_fd()
static int timerfd_timer_fd |
( |
void * |
data | ) |
|
|
static |
◆ timerfd_timer_get_event()
◆ timerfd_timer_get_max_rate()
static unsigned int timerfd_timer_get_max_rate |
( |
void * |
data | ) |
|
|
static |
◆ timerfd_timer_open()
static void * timerfd_timer_open |
( |
void |
| ) |
|
|
static |
Definition at line 84 of file res_timing_timerfd.c.
References ao2_alloc, ao2_ref, ast_log, errno, timerfd_timer::fd, LOG_ERROR, NULL, timer, and timer_destroy().
89 ast_log(
LOG_ERROR,
"Could not allocate memory for timerfd_timer structure\n");
92 if ((timer->
fd = timerfd_create(CLOCK_MONOTONIC, 0)) < 0) {
#define ao2_ref(o, delta)
#define ao2_alloc(data_size, destructor_fn)
static void timer_destroy(void *obj)
static struct ast_timer * timer
◆ timerfd_timer_set_rate()
static int timerfd_timer_set_rate |
( |
void * |
data, |
|
|
unsigned int |
rate |
|
) |
| |
|
static |
◆ unload_module()
static int unload_module |
( |
void |
| ) |
|
|
static |
◆ __mod_info
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Timerfd Timing Interface" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_TIMING, } |
|
static |
◆ ast_module_info
◆ timerfd_timing
◆ timing_funcs_handle
void* timing_funcs_handle |
|
static |