|
libUPnP
1.8.4
|

Functions | |
| static void | FreeTimerEvent (TimerThread *timer, TimerEvent *event) |
| Deallocates a dynamically allocated TimerEvent. More... | |
| static void | TimerThreadWorker (void *arg) |
| Implements timer thread. More... | |
| static int | CalculateEventTime (time_t *timeout, TimeoutType type) |
| Calculates the appropriate timeout in absolute seconds since Jan 1, 1970. More... | |
| static TimerEvent * | CreateTimerEvent (TimerThread *timer, ThreadPoolJob *job, Duration persistent, time_t eventTime, int id) |
| Creates a Timer Event. (Dynamically allocated). More... | |
| int | TimerThreadInit (TimerThread *timer, ThreadPool *tp) |
| Initializes and starts timer thread. More... | |
| int | TimerThreadSchedule (TimerThread *timer, time_t timeout, TimeoutType type, ThreadPoolJob *job, Duration duration, int *id) |
| Schedules an event to run at a specified time. More... | |
| int | TimerThreadRemove (TimerThread *timer, int id, ThreadPoolJob *out) |
| Removes an event from the timer Q. More... | |
| int | TimerThreadShutdown (TimerThread *timer) |
| Shutdown the timer thread. More... | |
|
static |
Calculates the appropriate timeout in absolute seconds since Jan 1, 1970.
| [in] | timeout | [in] Timeout. |
| [in] | type | [in] Timeout type. |
References ABS_SEC.
|
static |
Creates a Timer Event. (Dynamically allocated).
| [in] | timer | [in] Valid timer thread pointer. |
| [in] | job | [in] . |
| [in] | persistent | [in] . |
| [in] | eventTime | [in] The absoule time of the event in seconds from Jan, 1970. |
| [in] | id | [in] Id of job. |
References TIMEREVENT::eventTime, FreeListAlloc(), and TIMEREVENT::persistent.
|
static |
Deallocates a dynamically allocated TimerEvent.
| [in] | timer | [in] Valid timer thread pointer. |
| [in] | event | [in] Must be allocated with CreateTimerEvent |
References FreeListFree().
| int TimerThreadInit | ( | TimerThread * | timer, |
| ThreadPool * | tp | ||
| ) |
Initializes and starts timer thread.
| int TimerThreadRemove | ( | TimerThread * | timer, |
| int | id, | ||
| ThreadPoolJob * | out | ||
| ) |
Removes an event from the timer Q.
Events can only be removed before they have been placed in the thread pool.
Referenced by free_client_subscription().
| int TimerThreadSchedule | ( | TimerThread * | timer, |
| time_t | time, | ||
| TimeoutType | type, | ||
| ThreadPoolJob * | job, | ||
| Duration | duration, | ||
| int * | id | ||
| ) |
Schedules an event to run at a specified time.
| int TimerThreadShutdown | ( | TimerThread * | timer | ) |
Shutdown the timer thread.
Events scheduled in the future will NOT be run.
Timer thread should be shutdown BEFORE it's associated thread pool.
|
static |
Implements timer thread.
Waits for next event to occur and schedules associated job into threadpool.
| [in] | arg | [in] arg is cast to (TimerThread *). |
1.8.17