FreeSWITCH API Documentation
1.7.0
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
struct | switch_scheduler_task_container |
Typedefs | |
typedef struct switch_scheduler_task_container | switch_scheduler_task_container_t |
Functions | |
static void | switch_scheduler_execute (switch_scheduler_task_container_t *tp) |
static void *SWITCH_THREAD_FUNC | task_own_thread (switch_thread_t *thread, void *obj) |
static int | task_thread_loop (int done) |
static void *SWITCH_THREAD_FUNC | switch_scheduler_task_thread (switch_thread_t *thread, void *obj) |
uint32_t | switch_scheduler_add_task (time_t task_runtime, switch_scheduler_func_t func, const char *desc, const char *group, uint32_t cmd_id, void *cmd_arg, switch_scheduler_flag_t flags) |
Schedule a task in the future. More... | |
uint32_t | switch_scheduler_del_task_id (uint32_t task_id) |
Delete a scheduled task. More... | |
uint32_t | switch_scheduler_del_task_group (const char *group) |
Delete a scheduled task based on the group name. More... | |
void | switch_scheduler_task_thread_start (void) |
Start the scheduler system. More... | |
void | switch_scheduler_task_thread_stop (void) |
Stop the scheduler system. More... | |
Variables | |
struct { | |
switch_scheduler_task_container_t * task_list | |
switch_mutex_t * task_mutex | |
uint32_t task_id | |
int task_thread_running | |
switch_queue_t * event_queue | |
switch_memory_pool_t * memory_pool | |
} | globals |
switch_thread_t * | task_thread_p = NULL |
typedef struct switch_scheduler_task_container switch_scheduler_task_container_t |
Definition at line 47 of file switch_scheduler.c.
|
static |
Definition at line 58 of file switch_scheduler.c.
References switch_scheduler_task_container::desc, switch_scheduler_task_container::destroyed, switch_scheduler_task_container::executed, switch_scheduler_task_container::func, globals, switch_scheduler_task::group, switch_scheduler_task::repeat, switch_scheduler_task::runtime, switch_epoch_time_now(), switch_event_add_header(), switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_RE_SCHEDULE, SWITCH_INT64_T_FMT, switch_queue_push(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_str_nil, switch_scheduler_task_container::task, and switch_scheduler_task::task_id.
Referenced by task_own_thread(), and task_thread_loop().
|
static |
Definition at line 178 of file switch_scheduler.c.
References globals, SWITCH_CHANNEL_LOG, switch_event_destroy(), switch_event_fire, SWITCH_LOG_NOTICE, switch_log_printf(), switch_queue_pop_timeout(), switch_queue_trypop(), SWITCH_STATUS_SUCCESS, and task_thread_loop().
Referenced by switch_scheduler_task_thread_start().
|
static |
Definition at line 84 of file switch_scheduler.c.
References switch_scheduler_task_container::in_thread, switch_scheduler_task_container::pool, pool, switch_core_destroy_memory_pool, and switch_scheduler_execute().
Referenced by task_thread_loop().
|
static |
Definition at line 99 of file switch_scheduler.c.
References switch_scheduler_task::cmd_arg, switch_scheduler_task_container::desc, switch_scheduler_task_container::destroyed, switch_scheduler_task_container::executed, globals, switch_scheduler_task::group, switch_scheduler_task_container::in_thread, switch_scheduler_task_container::next, switch_scheduler_task_container::pool, switch_scheduler_task_container::running, switch_scheduler_task::runtime, SSHF_FREE_ARG, SSHF_OWN_THREAD, SWITCH_CHANNEL_LOG, switch_core_new_memory_pool, switch_epoch_time_now(), switch_event_add_header(), switch_event_add_header_string(), switch_event_create, SWITCH_EVENT_DEL_SCHEDULE, SWITCH_INT64_T_FMT, SWITCH_LOG_DEBUG, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_lock(), switch_mutex_unlock(), switch_queue_push(), switch_safe_free, switch_scheduler_execute(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_str_nil, switch_test_flag, switch_thread_create(), switch_threadattr_create(), switch_threadattr_detach_set(), switch_scheduler_task_container::task, switch_scheduler_task::task_id, task_own_thread(), and thread.
Referenced by switch_scheduler_task_thread().
switch_queue_t* event_queue |
Definition at line 54 of file switch_scheduler.c.
struct { ... } globals |
switch_memory_pool_t* memory_pool |
Definition at line 55 of file switch_scheduler.c.
uint32_t task_id |
Definition at line 52 of file switch_scheduler.c.
switch_scheduler_task_container_t* task_list |
Definition at line 50 of file switch_scheduler.c.
switch_mutex_t* task_mutex |
Definition at line 51 of file switch_scheduler.c.
switch_thread_t* task_thread_p = NULL |
Definition at line 326 of file switch_scheduler.c.
Referenced by switch_scheduler_task_thread_start(), and switch_scheduler_task_thread_stop().
int task_thread_running |
Definition at line 53 of file switch_scheduler.c.