Kernel - Expose thread timer for EVENT_TIMER, multiple sleepers for workqueue, cleanu...
[tpg/acess2.git] / KernelLand / Kernel / threads.c
index 73a2b58..545896c 100644 (file)
@@ -783,9 +783,13 @@ int Threads_int_Sleep(enum eThreadStatus Status, void *Ptr, int Num, tThread **L
                }
                *ListTail = us;
        }
-       else {
+       else if( ListHead ) {
+               us->Next = *ListHead;
                *ListHead = us;
        }
+       else {
+               // Nothing
+       }
        
        //if( Proc_ThreadSync(us) )
        //      return ;

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