run clang-format
This commit is contained in:
@@ -26,34 +26,33 @@
|
||||
* Structure to keep track of work queue requests.
|
||||
*/
|
||||
typedef struct workq_ele_tag {
|
||||
struct workq_ele_tag *next;
|
||||
void *data;
|
||||
struct workq_ele_tag* next;
|
||||
void* data;
|
||||
} workq_ele_t;
|
||||
|
||||
/*
|
||||
* Structure describing a work queue.
|
||||
*/
|
||||
typedef struct workq_tag {
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cv; /* wait for work */
|
||||
pthread_attr_t attr; /* create detached threads */
|
||||
workq_ele_t *first, *last; /* work queue */
|
||||
int valid; /* set when valid */
|
||||
int quit; /* set when workq should quit */
|
||||
int parallelism; /* number of threads required */
|
||||
int counter; /* current number of threads */
|
||||
int idle; /* number of idle threads */
|
||||
void (*engine)(void *arg); /* user engine */
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cv; /* wait for work */
|
||||
pthread_attr_t attr; /* create detached threads */
|
||||
workq_ele_t *first, *last; /* work queue */
|
||||
int valid; /* set when valid */
|
||||
int quit; /* set when workq should quit */
|
||||
int parallelism; /* number of threads required */
|
||||
int counter; /* current number of threads */
|
||||
int idle; /* number of idle threads */
|
||||
void (*engine)(void* arg); /* user engine */
|
||||
} workq_t;
|
||||
|
||||
#define WORKQ_VALID 0xdec1992
|
||||
#define WORKQ_VALID 0xdec1992
|
||||
|
||||
/*
|
||||
* Define work queue functions
|
||||
*/
|
||||
extern int workq_init (
|
||||
workq_t *wq,
|
||||
int threads, /* maximum threads */
|
||||
void (*engine)(void *)); /* engine routine */
|
||||
extern int workq_destroy (workq_t *wq);
|
||||
extern int workq_add (workq_t *wq, void *data);
|
||||
extern int workq_init(workq_t* wq,
|
||||
int threads, /* maximum threads */
|
||||
void (*engine)(void*)); /* engine routine */
|
||||
extern int workq_destroy(workq_t* wq);
|
||||
extern int workq_add(workq_t* wq, void* data);
|
||||
|
||||
Reference in New Issue
Block a user