Index: kernel/generic/include/synch/semaphore.h
===================================================================
--- kernel/generic/include/synch/semaphore.h	(revision 7f11dc6ba31c85d4b1daa9c4ebd4d6f99082a87c)
+++ kernel/generic/include/synch/semaphore.h	(revision 68a2fab2ab2d3ec0dea8f871618b22275c912434)
@@ -36,4 +36,5 @@
 #define KERN_SEMAPHORE_H_
 
+#include <errno.h>
 #include <stdint.h>
 #include <synch/waitq.h>
@@ -54,6 +55,6 @@
 
 #define semaphore_down_interruptable(s) \
-	(ESYNCH_INTERRUPTED != _semaphore_down_timeout((s), SYNCH_NO_TIMEOUT, \
-		SYNCH_FLAGS_INTERRUPTIBLE))
+	(_semaphore_down_timeout((s), SYNCH_NO_TIMEOUT, \
+		SYNCH_FLAGS_INTERRUPTIBLE) != EINTR)
 
 extern void semaphore_initialize(semaphore_t *, int);
Index: kernel/generic/include/synch/waitq.h
===================================================================
--- kernel/generic/include/synch/waitq.h	(revision 7f11dc6ba31c85d4b1daa9c4ebd4d6f99082a87c)
+++ kernel/generic/include/synch/waitq.h	(revision 68a2fab2ab2d3ec0dea8f871618b22275c912434)
@@ -67,13 +67,13 @@
 
 #define waitq_sleep(wq) \
-	waitq_sleep_timeout((wq), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
+	waitq_sleep_timeout((wq), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE, NULL)
 
 struct thread;
 
 extern void waitq_initialize(waitq_t *);
-extern int waitq_sleep_timeout(waitq_t *, uint32_t, unsigned int);
+extern int waitq_sleep_timeout(waitq_t *, uint32_t, unsigned int, bool *);
 extern ipl_t waitq_sleep_prepare(waitq_t *);
-extern int waitq_sleep_timeout_unsafe(waitq_t *, uint32_t, unsigned int);
-extern void waitq_sleep_finish(waitq_t *, int, ipl_t);
+extern int waitq_sleep_timeout_unsafe(waitq_t *, uint32_t, unsigned int, bool *);
+extern void waitq_sleep_finish(waitq_t *, bool, ipl_t);
 extern void waitq_wakeup(waitq_t *, wakeup_mode_t);
 extern void _waitq_wakeup_unsafe(waitq_t *, wakeup_mode_t);
