static inline bool CriticalSectionCreate(CRITSECT_HANDLE *CritSection) { … } static inline void CriticalSectionDelete(CRITSECT_HANDLE *CritSection) { … } static inline void CriticalSectionStart(CRITSECT_HANDLE *CritSection) { … } static inline void CriticalSectionEnd(CRITSECT_HANDLE *CritSection) { … } static THREAD_HANDLE ThreadCreate(NATIVE_THREAD_PTR Proc,void *Data) { … } static void ThreadClose(THREAD_HANDLE hThread) { … } #ifdef _WIN_ALL static void CWaitForSingleObject(HANDLE hHandle) { DWORD rc=WaitForSingleObject(hHandle,INFINITE); if (rc==WAIT_FAILED) { ErrHandler.GeneralErrMsg(L"\nWaitForMultipleObjects error %d, GetLastError %d",rc,GetLastError()); ErrHandler.Exit(RARX_FATAL); } } #endif #ifdef _UNIX static void cpthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { … } #endif uint GetNumberOfCPU() { … } uint GetNumberOfThreads() { … }