1 #ifndef RHESUS_TASK_POOL_H_
2 #define RHESUS_TASK_POOL_H_
9 #include "CountingSemaphore.h"
22 static void Start(INT32 numThreads);
24 static void EnqueueTask(FUNCPTR ptr, UINT32 arg0 = 0, UINT32 arg1 = 0,
25 UINT32 arg2 = 0, UINT32 arg3 = 0, UINT32 arg4 = 0, UINT32 arg5 = 0,
26 UINT32 arg6 = 0, UINT32 arg7 = 0, UINT32 arg8 = 0);
31 struct taskStructure {
45 static INT32 WorkerTask();
46 static INT32 WorkerTemp(taskStructure* t, Task* thisTask);
48 static std::queue<taskStructure> s_taskQ;
49 static Mutex s_taskQSyncObj;
51 static std::vector<Task*> s_tasks;
52 static std::vector<Task*> s_tempTasks;