Use MapLS/UnMapLS instead of SEGPTR_* macros.
diff --git a/scheduler/syslevel.c b/scheduler/syslevel.c
index 4647e19..9d849e8 100644
--- a/scheduler/syslevel.c
+++ b/scheduler/syslevel.c
@@ -8,7 +8,6 @@
#include <sys/types.h>
#include "ntddk.h"
#include "syslevel.h"
-#include "heap.h"
#include "stackframe.h"
#include "debugtools.h"
@@ -33,12 +32,13 @@
*/
SEGPTR WINAPI GetpWin16Lock16(void)
{
+ static SYSLEVEL *w16Mutex;
static SEGPTR segpWin16Mutex;
+
if (!segpWin16Mutex)
{
- SYSLEVEL **w16Mutex = SEGPTR_ALLOC(sizeof(SYSLEVEL *));
- *w16Mutex = &Win16Mutex;
- segpWin16Mutex = SEGPTR_GET(w16Mutex);
+ w16Mutex = &Win16Mutex;
+ segpWin16Mutex = MapLS( &w16Mutex );
}
return segpWin16Mutex;
}