1 ///////////////////////////////////////////////////////////////////////////////
2 // $Source: x:/prj/tech/libsrc/lg/RCS/coremutx.cpp $
4 // $Date: 1997/07/15 21:29:19 $
15 #pragma init_seg (compiler)
18 ///////////////////////////////////////////////////////////////////////////////
20 static int g_MutexInitDepth
;
21 CRITICAL_SECTION g_CoreMutex
;
23 ///////////////////////////////////////////////////////////////////////////////
39 ///////////////////////////////////////
41 static cCoreMutexInit g_CoreMutexInit
;
43 ///////////////////////////////////////////////////////////////////////////////
45 extern void CoreMutexInit(void)
48 if (g_MutexInitDepth
== 1)
49 InitializeCriticalSection(&g_CoreMutex
);
52 ///////////////////////////////////////
54 extern void CoreMutexTerm(void)
57 if (g_MutexInitDepth
== 0)
58 DeleteCriticalSection(&g_CoreMutex
);
61 ///////////////////////////////////////
63 extern void CoreThreadLock(void)
65 EnterCriticalSection(&g_CoreMutex
);
68 ///////////////////////////////////////
70 extern void CoreThreadUnlock(void)
72 LeaveCriticalSection(&g_CoreMutex
);
75 ///////////////////////////////////////////////////////////////////////////////