From e9d49af9fada3ca2b427cdb70cbd0a957798c406 Mon Sep 17 00:00:00 2001
From: erdgeist <>
Date: Tue, 20 Nov 2007 02:55:13 +0000
Subject: Tested for a too strict condition, we do need the correct tasktype
 AND an empty taskid, not the other way around

---
 ot_mutex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ot_mutex.c b/ot_mutex.c
index b01bb4a..5624c03 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -194,7 +194,7 @@ ot_taskid mutex_workqueue_poptask( ot_tasktype *tasktype ) {
   while( !taskid ) {
     /* Skip to the first unassigned task this worker wants to do */
     task = tasklist;
-    while( task && ( ( TASK_MASK & task->tasktype ) != *tasktype ) && ( task->taskid ) )
+    while( task && ( ( ( TASK_MASK & task->tasktype ) != *tasktype ) || task->taskid ) )
       task = task->next;
 
     /* If we found an outstanding task, assign a taskid to it
-- 
cgit v1.2.3