OpenDNSSEC-signer  1.3.14
Functions | Variables
worker.c File Reference
#include "adapter/adapi.h"
#include "daemon/engine.h"
#include "daemon/worker.h"
#include "shared/allocator.h"
#include "scheduler/schedule.h"
#include "scheduler/task.h"
#include "shared/hsm.h"
#include "shared/locks.h"
#include "shared/log.h"
#include "shared/status.h"
#include "shared/util.h"
#include "signer/tools.h"
#include "signer/zone.h"
#include "signer/zonedata.h"
#include <time.h>
Include dependency graph for worker.c:

Go to the source code of this file.

Functions

worker_typeworker_create (allocator_type *allocator, 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_wait_timeout (lock_basic_type *lock, cond_basic_type *condition, time_t timeout)
 
void worker_wait_timeout_locked (lock_basic_type *lock, cond_basic_type *condition, time_t timeout)
 
void worker_wait (lock_basic_type *lock, cond_basic_type *condition)
 
void worker_wait_locked (lock_basic_type *lock, cond_basic_type *condition)
 
void worker_notify (lock_basic_type *lock, cond_basic_type *condition)
 
void worker_notify_all (lock_basic_type *lock, cond_basic_type *condition)
 
void worker_cleanup (worker_type *worker)
 

Variables

ods_lookup_table worker_str []
 

Function Documentation

void worker_cleanup ( worker_type worker)
worker_type* worker_create ( allocator_type allocator,
int  num,
worker_id  type 
)
void worker_notify ( lock_basic_type lock,
cond_basic_type *  condition 
)

Notify a worker.

Definition at line 842 of file worker.c.

References lock_basic_alarm, lock_basic_lock, and lock_basic_unlock.

void worker_notify_all ( lock_basic_type lock,
cond_basic_type *  condition 
)

Notify all workers.

Definition at line 856 of file worker.c.

References lock_basic_broadcast, lock_basic_lock, and lock_basic_unlock.

Referenced by engine_stop_drudgers().

void worker_sleep ( worker_type worker,
time_t  timeout 
)
void worker_sleep_unless ( worker_type worker,
time_t  timeout 
)
void worker_start ( worker_type worker)

Start worker.

Definition at line 700 of file worker.c.

References ods_log_assert, ods_log_error(), worker_struct::type, WORKER_DRUDGER, and WORKER_WORKER.

void worker_wait ( lock_basic_type lock,
cond_basic_type *  condition 
)

Worker waiting.

Definition at line 818 of file worker.c.

References worker_wait_timeout().

void worker_wait_locked ( lock_basic_type lock,
cond_basic_type *  condition 
)

Worker waiting on an already locked cond.

Definition at line 830 of file worker.c.

References worker_wait_timeout_locked().

void worker_wait_timeout ( lock_basic_type lock,
cond_basic_type *  condition,
time_t  timeout 
)

Worker waiting.

Definition at line 790 of file worker.c.

References lock_basic_lock, lock_basic_sleep, and lock_basic_unlock.

Referenced by worker_wait().

void worker_wait_timeout_locked ( lock_basic_type lock,
cond_basic_type *  condition,
time_t  timeout 
)

Worker waiting on an already locked cond

Definition at line 805 of file worker.c.

References lock_basic_sleep.

Referenced by worker_wait_locked().

void worker_wakeup ( worker_type worker)

Variable Documentation

ods_lookup_table worker_str[]
Initial value:
= {
{ WORKER_WORKER, "worker" },
{ WORKER_DRUDGER, "drudger" },
{ 0, NULL }
}

The hard workers.

Definition at line 51 of file worker.c.