#ifndef _RAR_THREADPOOL_
#define _RAR_THREADPOOL_
#ifndef RAR_SMP
const uint MaxPoolThreads=1;
#else
const uint MaxPoolThreads= …;
#ifdef _UNIX
#include <pthread.h>
#include <semaphore.h>
#endif
#define USE_THREADS
#ifdef _UNIX
#define NATIVE_THREAD_TYPE …
NATIVE_THREAD_PTR;
THREAD_HANDLE;
CRITSECT_HANDLE;
#else
#define NATIVE_THREAD_TYPE …
typedef DWORD (WINAPI *NATIVE_THREAD_PTR)(void *Data);
typedef HANDLE THREAD_HANDLE;
typedef CRITICAL_SECTION CRITSECT_HANDLE;
#endif
PTHREAD_PROC;
#define THREAD_PROC(fn) …
uint GetNumberOfCPU();
uint GetNumberOfThreads();
class ThreadPool
{ … };
#endif
#endif