#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
#include <string.h>
#include <asterisk/sched.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/lock.h>
Go to the source code of this file.
Data Structures | |
struct | sched |
struct | sched_context |
Defines | |
#define | DEBUG(a) |
#define | SOONER(a, b) |
Functions | |
sched_context * | sched_context_create (void) |
New schedule context. | |
void | sched_context_destroy (struct sched_context *con) |
destroys a schedule context | |
int | ast_sched_wait (struct sched_context *con) |
Determines number of seconds until the next outstanding event to take place. | |
int | ast_sched_add (struct sched_context *con, int when, ast_sched_cb callback, void *data) |
Adds a scheduled event. | |
int | ast_sched_del (struct sched_context *con, int id) |
Deletes a scheduled event. | |
void | ast_sched_dump (struct sched_context *con) |
Dumps the scheduler contents. | |
int | ast_sched_runq (struct sched_context *con) |
Runs the queue. |
|
|
Value: Definition at line 32 of file sched.c. Referenced by ast_sched_runq(). |
|
Adds a scheduled event.
References ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_sched_cb, DEBUG, sched_context::eventcnt, sched_context::lock, LOG_DEBUG, and LOG_NOTICE.
|
|
Deletes a scheduled event.
References ast_log(), ast_mutex_lock, ast_mutex_unlock, CRASH, DEBUG, sched_context::lock, LOG_DEBUG, LOG_NOTICE, sched::next, s, sched_context::schedcnt, and sched_context::schedq. Referenced by ast_closestream().
|
|
Dumps the scheduler contents.
References ast_log(), sched_context::eventcnt, LOG_DEBUG, s, and sched_context::schedq.
|
|
Runs the queue.
References ast_log(), ast_mutex_lock, ast_mutex_unlock, DEBUG, sched_context::lock, LOG_DEBUG, LOG_NOTICE, sched::next, sched_context::schedcnt, sched_context::schedq, SOONER, and sched::when. Referenced by ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full().
|
|
Determines number of seconds until the next outstanding event to take place.
References ast_log(), ast_mutex_lock, ast_mutex_unlock, DEBUG, sched_context::lock, LOG_DEBUG, sched_context::schedq, and sched::when. Referenced by ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full().
|
|
New schedule context. Definition at line 62 of file sched.c. References malloc. Referenced by ast_channel_alloc().
|
|
destroys a schedule context
References ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, free, sched_context::lock, s, and sched_context::schedq. Referenced by ast_hangup().
|