OpenDNSSEC-enforcer  2.0.2
Data Structures | Typedefs | Functions
worker.h File Reference
#include "scheduler/task.h"
#include "db/db_connection.h"
#include <time.h>

Go to the source code of this file.

Data Structures

struct  worker_struct
 

Typedefs

typedef struct worker_struct worker_type
 

Functions

worker_typeworker_create (int num)
 
void worker_start (worker_type *worker)
 
void worker_cleanup (worker_type *worker)
 

Typedef Documentation

§ worker_type

typedef struct worker_struct worker_type

Definition at line 42 of file worker.h.

Function Documentation

§ worker_cleanup()

void worker_cleanup ( worker_type worker)

Clean up worker.

Parameters
[in]workerworker to clean up

Clean up worker.

Definition at line 131 of file worker.c.

Referenced by engine_teardown().

§ worker_create()

worker_type* worker_create ( int  num)

Create worker.

Parameters
[in]numthread number
[in]typetype of worker
Returns
worker_type* created worker

The hard workers. Create worker.

Definition at line 46 of file worker.c.

References worker_struct::dbconn, worker_struct::engine, worker_struct::jobs_appointed, worker_struct::jobs_completed, worker_struct::jobs_failed, worker_struct::need_to_exit, ods_log_debug(), worker_struct::sleeping, worker_struct::task, worker_struct::thread_num, and worker_struct::waiting.

§ worker_start()

void worker_start ( worker_type worker)

Start working.

Parameters
[in]workerworker to start working

Work.

Definition at line 99 of file worker.c.

References worker_struct::engine, worker_struct::need_to_exit, ods_log_debug(), schedule_pop_task(), worker_struct::task, engine_struct::taskq, and worker_struct::thread_num.