|
Crinit -- Configurable Rootfs Init
|
Implementation of functions related managing the pool of all timers. More...
#include "timerdb.h"#include <poll.h>#include <pthread.h>#include <stdint.h>#include <stdlib.h>#include <sys/eventfd.h>#include <sys/timerfd.h>#include <unistd.h>#include "common.h"#include "logio.h"#include "taskdb.h"#include "timer.h"
Functions | |
| static void * | crinitTimerDBRunPool (void *args) |
| static void | crinitPrintTimerPool (crinitTimerDB_t *pool) |
| static int | crinitTimerDBInsertTimer (crinitTimer_t timer) |
| int | crinitTimerDBInit (crinitTaskDB_t *taskDB) |
| int | crinitTimerDBSpawn (void) |
| void | crinitTimerDBRemoveTimer (char *timerStr) |
| void | crinitTimerDBAddTimer (char *timerStr) |
Variables | |
| crinitTimerDB_t | crinitTimerPool = {0} |
Implementation of functions related managing the pool of all timers.
|
static |
Debug print the state of the timer poll and all timers in it.
| pool | reference to the timerDB |
| void crinitTimerDBAddTimer | ( | char * | timerStr | ) |
Adds a timer to crinits timerDB.
| timerStr | the configuration string/name for the timer |
| int crinitTimerDBInit | ( | crinitTaskDB_t * | taskDB | ) |
Initialize the timer db handling all of crinit's timers.
| taskDB | the task db to initialize the timerdb for |
|
static |
Insert a timer into the timerDB. The timer needs to be fully initialized including the next timestamp
| timer | the timer to insert |
| void crinitTimerDBRemoveTimer | ( | char * | timerStr | ) |
Removes a timer from crinits timerDB.
| timerStr | the configuration string/name for the timer |
|
static |
The TimerDB thread function that handles the triggering of all timer events.
| args | UNUSED |
| int crinitTimerDBSpawn | ( | void | ) |
Spawns the timer thread handling all of crinits timer.
| crinitTimerDB_t crinitTimerPool = {0} |