Kernel - Slight semaphore fix
authorJohn Hodge <[email protected]>
Thu, 23 Feb 2012 16:03:10 +0000 (00:03 +0800)
committerJohn Hodge <[email protected]>
Thu, 23 Feb 2012 16:03:10 +0000 (00:03 +0800)
KernelLand/Kernel/semaphore.c

index d4583e7..e43547a 100644 (file)
@@ -33,6 +33,7 @@ int Semaphore_Wait(tSemaphore *Sem, int MaxToTake)
        if( MaxToTake < 0 ) {
                Log_Warning("Threads", "Semaphore_Wait: User bug - MaxToTake(%i) < 0, Sem=%p(%s)",
                        MaxToTake, Sem, Sem->Name);
+               MaxToTake = 0;
        }
        
        SHORTLOCK( &Sem->Protector );

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