X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fmutex.c;h=597242b6d6c179eaeb64319c27ac16692f1fc939;hb=7536e8afcc3018c4ca2a4aa8f8422cf86a6c188c;hp=4b4c4e4f3b9232172631c516ad2b7e8fcf972b54;hpb=340bda1dddf444ccf46fbc9e7a37bf6c3f0aeb6a;p=tpg%2Facess2.git diff --git a/Kernel/mutex.c b/Kernel/mutex.c index 4b4c4e4f..597242b6 100644 --- a/Kernel/mutex.c +++ b/Kernel/mutex.c @@ -27,7 +27,7 @@ int Mutex_Acquire(tMutex *Mutex) // Get protector SHORTLOCK( &Mutex->Protector ); - //Log("Mutex_Acquire: (%p)", Mutex); +// Log("Mutex_Acquire: (%p)", Mutex); // Check if the lock is already held if( Mutex->Owner ) { @@ -94,17 +94,12 @@ void Mutex_Release(tMutex *Mutex) Mutex->Owner = Mutex->Waiting; // Set owner Mutex->Waiting = Mutex->Waiting->Next; // Next! // Reset ->LastWaiting to NULL if we have just removed the last waiting thread - // 2010-10-02 21:50 - Comemerating the death of the longest single - // blocker in the Acess2 history. REMEMBER TO - // FUCKING MAINTAIN YOUR FUCKING LISTS DIPWIT if( Mutex->LastWaiting == Mutex->Owner ) Mutex->LastWaiting = NULL; // Wake new owner - SHORTLOCK( &glThreadListLock ); if( Mutex->Owner->Status != THREAD_STAT_ACTIVE ) Threads_AddActive(Mutex->Owner); - SHORTREL( &glThreadListLock ); } else { Mutex->Owner = NULL;