Asterisk - The Open Source Telephony Project
18.5.0
|
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) |
AST_TEST_DEFINE (test_kqueue_timing) | |
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.
Referenced by kqueue_timer_ack().
|
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.
AST_TEST_DEFINE | ( | test_kqueue_timing | ) |
Definition at line 396 of file res_timing_kqueue.c.
References ast_poll, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_tvdiff_us(), ast_tvnow(), sip_to_pjsip::info(), kqueue_timer_ack(), kqueue_timer_close(), kqueue_timer_enable_continuous(), kqueue_timer_fd(), kqueue_timer_get_event(), kqueue_timer_open(), kqueue_timer_set_rate(), TEST_EXECUTE, and TEST_INIT.
|
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, errno, filter(), kqueue_timer::handle, kqueue_timer::is_continuous, LOG_ERROR, NULL, and retval.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 193 of file res_timing_kqueue.c.
References ao2_ref, ast_debug, and kqueue_timer::handle.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 346 of file res_timing_kqueue.c.
References ao2_lock, ao2_unlock, ast_debug, ast_log, errno, kqueue_timer::handle, kqueue_timer::is_continuous, kqueue_timer_disable_continuous_event(), LOG_ERROR, and retval.
|
static |
Definition at line 148 of file res_timing_kqueue.c.
References kqueue_timer::continuous_fd, kqueue_timer::handle, and NULL.
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::handle, kqueue_timer::is_continuous, kqueue_timer_enable_continuous_event(), LOG_ERROR, and retval.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 139 of file res_timing_kqueue.c.
References kqueue_timer::continuous_fd, kqueue_timer::handle, and NULL.
Referenced by kqueue_timer_enable_continuous().
|
static |
Definition at line 388 of file res_timing_kqueue.c.
References kqueue_timer::handle.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 132 of file res_timing_kqueue.c.
References kqueue_timer::continuous_fd, and kqueue_timer::continuous_fd_valid.
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 kqueue_timer::is_continuous.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 383 of file res_timing_kqueue.c.
|
static |
Definition at line 118 of file res_timing_kqueue.c.
References kqueue_timer::continuous_fd, kqueue_timer::continuous_fd_valid, and retval.
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::handle, kqueue_timer_init_continuous_event(), LOG_ERROR, NULL, timer, and timer_destroy().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 239 of file res_timing_kqueue.c.
References ao2_lock, ao2_unlock, ast_debug, ast_log, errno, kqueue_timer::handle, kqueue_scale_period(), LOG_ERROR, NULL, kqueue_timer::period, and retval.
Referenced by AST_TEST_DEFINE().
|
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, and timing_funcs_handle.
Referenced by unload_module().
|
static |
Definition at line 157 of file res_timing_kqueue.c.
References ast_debug, kqueue_timer::handle, and kqueue_timer_fini_continuous_event().
Referenced by kqueue_timer_open().
|
static |
Definition at line 496 of file res_timing_kqueue.c.
References AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CHANNEL_DEPEND, AST_MODULE_INFO(), AST_MODULE_SUPPORT_EXTENDED, AST_TEST_UNREGISTER, ast_unregister_timing_interface(), ASTERISK_GPL_KEY, load_module(), 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.
|
static |
Definition at line 49 of file res_timing_kqueue.c.
Referenced by load_module(), and unload_module().