- uses now job_queue
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "thread_pool.h"
|
||||
|
||||
#include "job_queue.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <freeswan.h>
|
||||
#include <pluto/constants.h>
|
||||
@@ -30,6 +32,9 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
extern job_queue_t *job_queue;
|
||||
|
||||
|
||||
/**
|
||||
* structure with private members for thread_pool
|
||||
*/
|
||||
@@ -49,14 +54,19 @@ typedef struct {
|
||||
} private_thread_pool_t;
|
||||
|
||||
|
||||
pthread_mutex_t muti = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
pthread_cond_t condi = PTHREAD_COND_INITIALIZER;
|
||||
|
||||
void *job_processing(private_thread_pool_t *this)
|
||||
{
|
||||
|
||||
for (;;) {
|
||||
|
||||
sleep(1);
|
||||
/*job_t *job;
|
||||
job_queue->get(job_queue, &job);*/
|
||||
|
||||
sleep(100);
|
||||
/* flag for termination received ? */
|
||||
pthread_testcancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user