Fix bug introduced when adding sem_timedwait
authorKevin Klues <klueska@cs.berkeley.edu>
Tue, 7 Jul 2015 21:23:22 +0000 (14:23 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 14 Jul 2015 14:33:16 +0000 (10:33 -0400)
Previously, all we needed was the __sem, but now we have a wrapper
around it to support sem_timedwait()

user/pthread/semaphore.c

index ad238c2..4fd89a2 100644 (file)
@@ -109,7 +109,7 @@ int sem_wait (sem_t *__sem)
        }
        else {
                /* We unlock in the body of __sem_block */
-               uthread_yield(TRUE, __sem_block, __sem);
+               uthread_yield(TRUE, __sem_block, &e);
        }
        return 0;
 }