Index: libc/generic/futex.c
===================================================================
--- libc/generic/futex.c	(revision 29a9f628c8583835e581747cfad7877e27f6d810)
+++ libc/generic/futex.c	(revision 77bd0042650371be594f68132406e2c863e3dc6f)
@@ -50,5 +50,8 @@
 int futex_up(atomic_t *futex)
 {
-	if (atomic_preinc(futex) == 0)
+	long val;
+	
+	val = atomic_postinc(futex);
+	if (val < 0)
 		return __SYSCALL1(SYS_FUTEX_WAKEUP, (sysarg_t) &futex->count);
 		
