OpenDNSSEC-signer
2.0.4
|
#include "config.h"
#include <time.h>
#include "scheduler/task.h"
#include "status.h"
#include "locks.h"
Go to the source code of this file.
Data Structures | |
struct | worker_struct |
Typedefs | |
typedef enum worker_enum | worker_id |
typedef struct worker_struct | worker_type |
Enumerations | |
enum | worker_enum { WORKER_NONE = 0, WORKER_WORKER = 1, WORKER_DRUDGER } |
Functions | |
worker_type * | worker_create (int num, worker_id type) |
void | worker_start (worker_type *worker) |
void | worker_sleep (worker_type *worker, time_t timeout) |
void | worker_sleep_unless (worker_type *worker, time_t timeout) |
void | worker_wakeup (worker_type *worker) |
void | worker_notify_all (lock_basic_type *lock, cond_basic_type *condition) |
void | worker_cleanup (worker_type *worker) |
typedef enum worker_enum worker_id |
typedef struct worker_struct worker_type |
enum worker_enum |
void worker_cleanup | ( | worker_type * | worker | ) |
Clean up worker.
[in] | worker | worker to clean up |
Clean up worker.
Definition at line 837 of file worker.c.
References worker_struct::worker_alarm, and worker_struct::worker_lock.
Referenced by engine_cleanup().
worker_type* worker_create | ( | int | num, |
worker_id | type | ||
) |
void worker_notify_all | ( | lock_basic_type * | lock, |
cond_basic_type * | condition | ||
) |
void worker_sleep | ( | worker_type * | worker, |
time_t | timeout | ||
) |
Put worker to sleep.
[in] | worker | put this worker to sleep |
[in] | timeout | time before alarm clock is going off, 0 means no alarm clock is set. |
Put worker to sleep.
Definition at line 765 of file worker.c.
References worker_struct::need_to_exit, worker_struct::sleeping, worker_struct::worker_alarm, and worker_struct::worker_lock.
void worker_sleep_unless | ( | worker_type * | worker, |
time_t | timeout | ||
) |
Put worker to sleep unless the worker has measured up to all appointed jobs.
[in] | worker | put this worker to sleep |
[in] | timeout | time before alarm clock is going off, 0 means no alarm clock is set. |
Put worker to sleep unless worker has measured up to all appointed jobs.
Definition at line 783 of file worker.c.
References worker_struct::need_to_exit, and worker_struct::worker_lock.
void worker_start | ( | worker_type * | worker | ) |
Start working.
[in] | worker | worker to start working |
Start worker.
Definition at line 743 of file worker.c.
References worker_struct::type, and WORKER_DRUDGER.
void worker_wakeup | ( | worker_type * | worker | ) |
Wake up worker.
[in] | worker | wake up this worker |
Wake up worker.
Definition at line 805 of file worker.c.
References worker_struct::sleeping, and worker_struct::waiting.