proc/cond: grab lock after interrupt or timeout
@@ -71,9 +71,9 @@ int proc_condWait(unsigned int c, unsigned int m, time_t timeout)
hal_spinlockSet(&lock->spinlock);
_proc_lockClear(lock);
- if (!(err = proc_threadWait(&rc->waitq, &lock->spinlock, timeout)))
- _proc_lockSet(lock);
+ err = proc_threadWait(&rc->waitq, &lock->spinlock, timeout);
+ _proc_lockSet(lock);
hal_spinlockClear(&lock->spinlock);
proc_threadProtect();
