first commit
This commit is contained in:
29
CS4210/Project 3/common/thread_pool/thread_pool.h
Normal file
29
CS4210/Project 3/common/thread_pool/thread_pool.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef _THREAD_POOL_H_
|
||||
#define _THREAD_POOL_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../pthreads/include/pthread.h"
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Variables
|
||||
*/
|
||||
|
||||
pthread_t **consumerList;
|
||||
pthread_t *producerThread;
|
||||
|
||||
/*
|
||||
* Methods
|
||||
*/
|
||||
void addSocket(int);
|
||||
int removeSocket();
|
||||
void init_thread_pool(unsigned short*, int,
|
||||
void *(*producer)(void*),
|
||||
void *(*consumer)(void*),
|
||||
void *args);
|
||||
unsigned int size();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user