diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-01-06 22:05:54 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-01-06 22:05:54 -0500 |
commit | eca335fc0453d3680fd9f112574919e13fab31d2 (patch) | |
tree | 4cb5225adcd4508405087557f74da1096be3b7d5 /src/thread/__wait.c | |
parent | 839cc4e6da609a0b24f6cc32b0b11558fd77dd83 (diff) | |
download | musl-eca335fc0453d3680fd9f112574919e13fab31d2.tar.gz musl-eca335fc0453d3680fd9f112574919e13fab31d2.tar.xz musl-eca335fc0453d3680fd9f112574919e13fab31d2.zip |
eliminate explicit (long) casts when making syscalls
this practice came from very early, before internal/syscall.h defined macros that could accept pointer arguments directly and handle them correctly. aside from being ugly and unnecessary, it looks like it will be problematic when we add support for 32-bit ABIs on archs where registers (and syscall arguments) are 64-bit, e.g. x32 and mips n32.
Diffstat (limited to 'src/thread/__wait.c')
-rw-r--r-- | src/thread/__wait.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/__wait.c b/src/thread/__wait.c index 041a0669..a1e47804 100644 --- a/src/thread/__wait.c +++ b/src/thread/__wait.c @@ -10,6 +10,6 @@ void __wait(volatile int *addr, volatile int *waiters, int val, int priv) } if (waiters) a_inc(waiters); while (*addr==val) - __syscall(SYS_futex, (long)addr, FUTEX_WAIT|priv, val, 0); + __syscall(SYS_futex, addr, FUTEX_WAIT|priv, val, 0); if (waiters) a_dec(waiters); } |