Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
kqueue timing interface More...
#include "asterisk.h"
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include "asterisk/module.h"
#include "asterisk/astobj2.h"
#include "asterisk/timing.h"
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/time.h"
#include "asterisk/test.h"
#include "asterisk/poll-compat.h"
Go to the source code of this file.
Data Structures | |
struct | kqueue_timer |
Macros | |
#define | CONTINUOUS_EVFILT_TYPE EVFILT_READ |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static intptr_t | kqueue_scale_period (unsigned int period_ns, int *units) |
static int | kqueue_timer_ack (void *data, unsigned int quantity) |
static void | kqueue_timer_close (void *data) |
static int | kqueue_timer_disable_continuous (void *data) |
static int | kqueue_timer_disable_continuous_event (struct kqueue_timer *timer) |
static int | kqueue_timer_enable_continuous (void *data) |
static int | kqueue_timer_enable_continuous_event (struct kqueue_timer *timer) |
static int | kqueue_timer_fd (void *data) |
static void | kqueue_timer_fini_continuous_event (struct kqueue_timer *timer) |
static enum ast_timer_event | kqueue_timer_get_event (void *data) |
static unsigned int | kqueue_timer_get_max_rate (void *data) |
static int | kqueue_timer_init_continuous_event (struct kqueue_timer *timer) |
static void * | kqueue_timer_open (void) |
static int | kqueue_timer_set_rate (void *data, unsigned int rate) |
static int | load_module (void) |
Load the module. More... | |
static void | timer_destroy (void *obj) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "KQueue 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_EXTENDED, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_timing_interface | kqueue_timing |
static void * | timing_funcs_handle |
kqueue timing interface
Definition in file res_timing_kqueue.c.
#define CONTINUOUS_EVFILT_TYPE EVFILT_READ |
Definition at line 117 of file res_timing_kqueue.c.
|
static |
Definition at line 508 of file res_timing_kqueue.c.
|
static |
Definition at line 508 of file res_timing_kqueue.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 508 of file res_timing_kqueue.c.
|
static |
Definition at line 205 of file res_timing_kqueue.c.
References kqueue_timer::period.
Referenced by kqueue_timer_set_rate().
|
static |
Definition at line 279 of file res_timing_kqueue.c.
References ao2_lock, ao2_unlock, ast_log, CONTINUOUS_EVFILT_TYPE, ast_timer::data, errno, filter(), LOG_ERROR, NULL, retval, and timer.
|
static |
Definition at line 193 of file res_timing_kqueue.c.
|
static |
Definition at line 346 of file res_timing_kqueue.c.
References ao2_lock, ao2_unlock, ast_debug, ast_log, errno, kqueue_timer_disable_continuous_event(), LOG_ERROR, retval, and timer.
|
static |
Definition at line 148 of file res_timing_kqueue.c.
Referenced by kqueue_timer_disable_continuous().
|
static |
Definition at line 323 of file res_timing_kqueue.c.
References ao2_lock, ao2_unlock, ast_debug, ast_log, errno, kqueue_timer_enable_continuous_event(), LOG_ERROR, retval, and timer.
|
static |
Definition at line 139 of file res_timing_kqueue.c.
Referenced by kqueue_timer_enable_continuous().
|
static |
Definition at line 388 of file res_timing_kqueue.c.
References timer.
|
static |
Definition at line 132 of file res_timing_kqueue.c.
References timer.
Referenced by timer_destroy().
|
static |
Definition at line 369 of file res_timing_kqueue.c.
References AST_TIMING_EVENT_CONTINUOUS, AST_TIMING_EVENT_EXPIRED, and timer.
|
static |
Definition at line 383 of file res_timing_kqueue.c.
|
static |
Definition at line 118 of file res_timing_kqueue.c.
Referenced by kqueue_timer_open().
|
static |
Definition at line 167 of file res_timing_kqueue.c.
References ao2_alloc, ao2_ref, ast_debug, ast_log, errno, kqueue_timer_init_continuous_event(), LOG_ERROR, NULL, timer, and timer_destroy().
|
static |
Definition at line 239 of file res_timing_kqueue.c.
References ao2_lock, ao2_unlock, ast_debug, ast_log, errno, kqueue_scale_period(), LOG_ERROR, NULL, retval, and timer.
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 486 of file res_timing_kqueue.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_register_timing_interface, AST_TEST_REGISTER, kqueue_timing, and timing_funcs_handle.
|
static |
Definition at line 157 of file res_timing_kqueue.c.
References ast_debug, kqueue_timer_fini_continuous_event(), and timer.
Referenced by kqueue_timer_open().
|
static |
Definition at line 496 of file res_timing_kqueue.c.
References AST_TEST_UNREGISTER, ast_unregister_timing_interface(), and timing_funcs_handle.
|
static |
Definition at line 508 of file res_timing_kqueue.c.
|
static |
Definition at line 508 of file res_timing_kqueue.c.
|
static |
Definition at line 61 of file res_timing_kqueue.c.
Referenced by load_module().
|
static |
Definition at line 49 of file res_timing_kqueue.c.
Referenced by load_module(), and unload_module().