mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 14:14:16 +00:00
freetdm: run sched in the background if requested
This commit is contained in:
1 parent
48c7bb320e
commit
22e8a44278
6 files changed
+279
-12
No files matched your search
@@ -48,11 +48,14 @@ typedef struct ftdm_timer ftdm_timer_t;
|
||||
typedef void (*ftdm_sched_callback_t)(void *data);
|
||||
|
||||
/*! \brief Create a new scheduling context */
|
||||
FT_DECLARE(ftdm_status_t) ftdm_sched_create(ftdm_sched_t **sched);
|
||||
FT_DECLARE(ftdm_status_t) ftdm_sched_create(ftdm_sched_t **sched, const char *name);
|
||||
|
||||
/*! \brief Run the schedule to find timers that are expired and run its callbacks */
|
||||
FT_DECLARE(ftdm_status_t) ftdm_sched_run(ftdm_sched_t *sched);
|
||||
|
||||
/*! \brief Run the schedule in its own thread. Callbacks will be called in a core thread. You *must* not block there! */
|
||||
FT_DECLARE(ftdm_status_t) ftdm_sched_free_run(ftdm_sched_t *sched);
|
||||
|
||||
/*!
|
||||
* \brief Schedule a new timer
|
||||
* \param sched The scheduling context (required)
|
||||
@@ -82,6 +85,12 @@ FT_DECLARE(ftdm_status_t) ftdm_sched_destroy(ftdm_sched_t **sched);
|
||||
*/
|
||||
FT_DECLARE(ftdm_status_t) ftdm_sched_get_time_to_next_timer(const ftdm_sched_t *sched, int32_t *timeto);
|
||||
|
||||
/*! \brief Global initialization, called just once, this is called by FreeTDM core, other users MUST not call it */
|
||||
FT_DECLARE(ftdm_status_t) ftdm_sched_global_init(void);
|
||||
|
||||
/*! \brief Checks if the main scheduling thread is running */
|
||||
FT_DECLARE(ftdm_bool_t) ftdm_free_sched_running(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user