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