From facc6acbfd20accea435d10fdd070b23877e40db Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 1 Feb 2013 16:41:53 -0500 Subject: replace __wake function with macro that performs direct syscall this should generate faster and smaller code, especially with inline syscalls. the conditional with cnt is ugly, but thankfully cnt is always a constant anyway so it gets evaluated at compile time. it may be preferable to make separate __wake and __wakeall macros without a count argument. priv flag is not used yet; private futex support still needs to be done at some point in the future. --- src/thread/__wake.c | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 src/thread/__wake.c (limited to 'src/thread/__wake.c') 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 - -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); -} -- cgit v1.2.1