-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjobqueue.h
More file actions
23 lines (20 loc) · 796 Bytes
/
jobqueue.h
File metadata and controls
23 lines (20 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* @file jobqueue.h
* @author Alan R. Rogers
* @brief Header for jobqueue.c
* @copyright Copyright (c) 2014, Alan R. Rogers
* <rogers@anthro.utah.edu>. This file is released under the Internet
* Systems Consortium License, which can be found in file "LICENSE".
*/
#ifndef ARR_JOBQUEUE
# define ARR_JOBQUEUE
typedef struct JobQueue JobQueue;
JobQueue *JobQueue_new(int nthreads, void *threadData,
void *(*ThreadState_new) (void *),
void (*ThreadState_free) (void *));
void JobQueue_addJob(JobQueue * jq,
int (*jobfun) (void *, void *), void *param);
void JobQueue_noMoreJobs(JobQueue * jq);
void JobQueue_waitOnJobs(JobQueue * jq);
void JobQueue_free(JobQueue * jq);
#endif