consistency: change all remaining syscalls to use SYS_ rather than __NR_ prefix

This commit is contained in:
Rich Felker 2011-04-06 20:32:53 -04:00
commit c2cd25bff8
38 changed files with 40 additions and 40 deletions

View file

@ -7,5 +7,5 @@ void __lock(volatile int *l)
* assignment to optimize non-pathological code with no contention. */
while (a_xchg(l, 1))
if (spins) spins--, a_spin();
else __syscall(__NR_sched_yield);
else __syscall(SYS_sched_yield);
}

View file

@ -17,7 +17,7 @@ int __timedwait(volatile int *addr, int val, clockid_t clk, const struct timespe
if (to.tv_sec < 0) return ETIMEDOUT;
}
if (priv) priv = 128; priv=0;
r = -__syscall(__NR_futex, (long)addr, FUTEX_WAIT | priv, val, at ? (long)&to : 0);
r = -__syscall(SYS_futex, (long)addr, FUTEX_WAIT | priv, val, at ? (long)&to : 0);
if (r == ETIMEDOUT || r == EINTR) return r;
return 0;
}

View file

@ -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(__NR_futex, (long)addr, FUTEX_WAIT|priv, val, 0);
__syscall(SYS_futex, (long)addr, FUTEX_WAIT|priv, val, 0);
if (waiters) a_dec(waiters);
}

View file

@ -4,5 +4,5 @@ void __wake(volatile int *addr, int cnt, int priv)
{
if (priv) priv = 128; priv=0;
if (cnt<0) cnt = INT_MAX;
__syscall(__NR_futex, (long)addr, FUTEX_WAKE | priv, cnt);
__syscall(SYS_futex, (long)addr, FUTEX_WAKE | priv, cnt);
}

View file

@ -36,7 +36,7 @@ void __pthread_unwind_next(struct __ptcb *cb)
exit(0);
if (self->detached && self->map_base) {
__syscall(__NR_rt_sigprocmask, SIG_BLOCK, (long)(uint64_t[1]){-1},0,8);
__syscall(SYS_rt_sigprocmask, SIG_BLOCK, (long)(uint64_t[1]){-1},0,8);
__unmapself(self->map_base, self->map_size);
}

View file

@ -2,5 +2,5 @@
int pthread_kill(pthread_t t, int sig)
{
return -__syscall(__NR_tgkill, t->pid, t->tid, sig);
return -__syscall(SYS_tgkill, t->pid, t->tid, sig);
}

View file

@ -3,9 +3,9 @@
.global __unmapself
.type __unmapself,%function
__unmapself:
movl $11,%eax /* __NR_munmap */
movl $11,%eax /* SYS_munmap */
syscall /* munmap(arg2,arg3) */
xor %rdi,%rdi /* exit() args: always return success */
movl $60,%eax /* __NR_exit */
movl $60,%eax /* SYS_exit */
syscall /* exit(0) */
.size __unmapself,.-__unmapself