Kernel - Converted most blocking states to use Threads_int_Sleep
[tpg/acess2.git] / KernelLand / Kernel / workqueue.c
index 2083bde..3e35b06 100644 (file)
@@ -20,8 +20,6 @@ void Workqueue_Init(tWorkqueue *Queue, const char *Name, size_t NextOfset)
 
 void *Workqueue_GetWork(tWorkqueue *Queue)
 {
-       tThread *us;
-
        for( ;; )
        {
                // Check for work
@@ -36,25 +34,9 @@ void *Workqueue_GetWork(tWorkqueue *Queue)
                        return ret;
                }
                
-               #if 0
                Threads_int_Sleep(THREAD_STAT_QUEUESLEEP,
                        Queue, 0,
                        &Queue->Sleeper, NULL, &Queue->Protector);
-               #endif
-               // Go to sleep
-               SHORTLOCK(&glThreadListLock);
-               us = Threads_RemActive();
-               us->WaitPointer = Queue;
-               us->Status = THREAD_STAT_QUEUESLEEP;
-               Queue->Sleeper = us;
-               
-               SHORTREL(&Queue->Protector);    
-               SHORTREL(&glThreadListLock);
-               
-               // Yield and sleep
-               Threads_int_WaitForStatusEnd(THREAD_STAT_QUEUESLEEP);
-
-               us->WaitPointer = NULL;
        }
 }
 

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