summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/pthread_impl.h3
-rw-r--r--src/thread/__wake.c9
2 files changed, 2 insertions, 10 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index 4215e67a..544da9ce 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -106,7 +106,8 @@ void __unmapself(void *, size_t);
int __timedwait(volatile int *, int, clockid_t, const struct timespec *, void (*)(void *), void *, int);
void __wait(volatile int *, volatile int *, int, int);
-void __wake(volatile int *, int, int);
+#define __wake(addr, cnt, priv) \
+ __syscall(SYS_futex, addr, FUTEX_WAKE, (cnt)<0?INT_MAX:(cnt))
void __acquire_ptc();
void __release_ptc();
diff --git a/src/thread/__wake.c b/src/thread/__wake.c
deleted file mode 100644
index d8bf70f7..00000000
--- a/src/thread/__wake.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "pthread_impl.h"
-#include <limits.h>
-
-void __wake(volatile int *addr, int cnt, int priv)
-{
- if (priv) priv = 128; priv=0;
- if (cnt<0) cnt = INT_MAX;
- __syscall(SYS_futex, (long)addr, FUTEX_WAKE | priv, cnt);
-}