diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f86cb4..b3ebf15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -614,6 +614,7 @@ set(src_sys_dedicated sys/linux/dedicated.cpp) if (APPLE) set(src_sys_base + sys/threads.cpp sys/sys_local.cpp sys/posix/posix_net.cpp sys/posix/posix_signal.cpp @@ -635,6 +636,7 @@ if (APPLE) ) elseif (WIN32) set(src_sys_base + sys/threads.cpp sys/sys_local.cpp sys/win32/win_cpu.cpp # sys/win32/win_gamma.cpp @@ -654,6 +656,7 @@ elseif (WIN32) ) else() set(src_sys_base + sys/threads.cpp sys/sys_local.cpp sys/posix/posix_net.cpp sys/posix/posix_signal.cpp diff --git a/sys/sys_public.h b/sys/sys_public.h index 6813bae..f583ca2 100644 --- a/sys/sys_public.h +++ b/sys/sys_public.h @@ -383,13 +383,17 @@ void Sys_DestroyThread( xthreadInfo& info ); // sets threadHandle back to 0 // if index != NULL, set the index in g_threads array (use -1 for "main" thread) const char * Sys_GetThreadName( int *index = 0 ); -const int MAX_CRITICAL_SECTIONS = 4; +extern void Sys_InitThreads(); +extern void Sys_ShutdownThreads(); + +const int MAX_CRITICAL_SECTIONS = 5; enum { CRITICAL_SECTION_ZERO = 0, CRITICAL_SECTION_ONE, CRITICAL_SECTION_TWO, - CRITICAL_SECTION_THREE + CRITICAL_SECTION_THREE, + CRITICAL_SECTION_SYS }; void Sys_EnterCriticalSection( int index = CRITICAL_SECTION_ZERO );