about summary refs log tree commit diff
path: root/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/__lock.c2
-rw-r--r--src/thread/__timedwait.c2
-rw-r--r--src/thread/__wait.c2
-rw-r--r--src/thread/__wake.c2
-rw-r--r--src/thread/pthread_create.c2
-rw-r--r--src/thread/pthread_kill.c2
-rw-r--r--src/thread/x86_64/__unmapself.s4
7 files changed, 8 insertions, 8 deletions
diff --git a/src/thread/__lock.c b/src/thread/__lock.c
index 21cb71a8..2e00636f 100644
--- a/src/thread/__lock.c
+++ b/src/thread/__lock.c
@@ -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);
 }
diff --git a/src/thread/__timedwait.c b/src/thread/__timedwait.c
index a673099b..5c84e80c 100644
--- a/src/thread/__timedwait.c
+++ b/src/thread/__timedwait.c
@@ -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;
 }
diff --git a/src/thread/__wait.c b/src/thread/__wait.c
index b0969bb2..d024fb37 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(__NR_futex, (long)addr, FUTEX_WAIT|priv, val, 0);
+		__syscall(SYS_futex, (long)addr, FUTEX_WAIT|priv, val, 0);
 	if (waiters) a_dec(waiters);
 }
diff --git a/src/thread/__wake.c b/src/thread/__wake.c
index 6f2f894a..8fd0599c 100644
--- a/src/thread/__wake.c
+++ b/src/thread/__wake.c
@@ -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);
 }
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index ec329f50..acbd5a41 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -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);
 	}
 
diff --git a/src/thread/pthread_kill.c b/src/thread/pthread_kill.c
index 17aa5c4b..36e9b6da 100644
--- a/src/thread/pthread_kill.c
+++ b/src/thread/pthread_kill.c
@@ -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);
 }
diff --git a/src/thread/x86_64/__unmapself.s b/src/thread/x86_64/__unmapself.s
index d36257d0..0b04d99c 100644
--- a/src/thread/x86_64/__unmapself.s
+++ b/src/thread/x86_64/__unmapself.s
@@ -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