SpiderScript - Commenting changes
[tpg/acess2.git] / Kernel / messages.c
index 4765d65..45b5dfa 100644 (file)
@@ -4,8 +4,12 @@
  */
 #include <acess.h>
 #include <threads.h>
+#include <threads_int.h>
 #include <errno.h>
 
+// === IMPORTS ===
+extern tShortSpinlock  glThreadListLock;
+
 // === CODE ===
 /**
  * \fn int Proc_SendMessage(Uint *Err, Uint Dest, int Length, void *Data)
@@ -60,7 +64,9 @@ int Proc_SendMessage(Uint *Err, Uint Dest, int Length, void *Data)
        
        SHORTREL(&thread->IsLocked);
        
+       SHORTLOCK(&glThreadListLock);
        Threads_Wake( thread );
+       SHORTREL(&glThreadListLock);
        
        return 0;
 }

UCC git Repository :: git.ucc.asn.au