OpenDNSSEC-signer  2.0.4
Functions | Variables
worker.c File Reference
#include <time.h>
#include "daemon/engine.h"
#include "daemon/worker.h"
#include "duration.h"
#include "hsm.h"
#include "locks.h"
#include "log.h"
#include "status.h"
#include "signer/tools.h"
#include "signer/zone.h"

Go to the source code of this file.

Functions

worker_typeworker_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)
 

Variables

ods_lookup_table worker_str []
 

Function Documentation

◆ worker_cleanup()

void worker_cleanup ( worker_type worker)

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_create()

worker_type* worker_create ( int  num,
worker_id  type 
)

Create worker.

Definition at line 65 of file worker.c.

◆ worker_notify_all()

void worker_notify_all ( lock_basic_type *  lock,
cond_basic_type *  condition 
)

Notify all workers.

Definition at line 824 of file worker.c.

◆ worker_sleep()

void worker_sleep ( worker_type worker,
time_t  timeout 
)

◆ worker_sleep_unless()

void worker_sleep_unless ( worker_type worker,
time_t  timeout 
)

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.

◆ worker_start()

void worker_start ( worker_type worker)

Start worker.

Definition at line 743 of file worker.c.

References worker_struct::type, and WORKER_DRUDGER.

◆ worker_wakeup()

void worker_wakeup ( worker_type worker)

Wake up worker.

Definition at line 805 of file worker.c.

References worker_struct::sleeping, and worker_struct::waiting.

Variable Documentation

◆ worker_str

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

Definition at line 39 of file worker.c.