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/__futex.c3
-rw-r--r--src/thread/pthread_create.c2
-rw-r--r--src/thread/pthread_mutex_trylock.c4
-rw-r--r--src/thread/pthread_self.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/thread/__futex.c b/src/thread/__futex.c
index 93352fa3..96307c08 100644
--- a/src/thread/__futex.c
+++ b/src/thread/__futex.c
@@ -3,6 +3,5 @@
 
 int __futex(volatile int *addr, int op, int val, void *ts)
 {
-	return syscall4(__NR_futex, (long)addr, op, val, (long)ts);
+	return syscall(SYS_futex, addr, op, val, ts);
 }
-
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 3716f75a..17a47f6a 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -36,7 +36,7 @@ void __pthread_unwind_next(struct __ptcb *cb)
 		__unmapself(self->map_base, self->map_size);
 	}
 
-	__syscall_exit(0);
+	syscall(SYS_exit, 0);
 }
 
 static void docancel(struct pthread *self)
diff --git a/src/thread/pthread_mutex_trylock.c b/src/thread/pthread_mutex_trylock.c
index f48aaade..232e172b 100644
--- a/src/thread/pthread_mutex_trylock.c
+++ b/src/thread/pthread_mutex_trylock.c
@@ -14,8 +14,8 @@ int pthread_mutex_trylock(pthread_mutex_t *m)
 
 	if (m->_m_type >= 4) {
 		if (!self->robust_list.off)
-			syscall2(__NR_set_robust_list,
-				(long)&self->robust_list, 3*sizeof(long));
+			syscall(SYS_set_robust_list,
+				&self->robust_list, 3*sizeof(long));
 		self->robust_list.off = (char*)&m->_m_lock-(char *)&m->_m_next;
 		self->robust_list.pending = &m->_m_next;
 	}
diff --git a/src/thread/pthread_self.c b/src/thread/pthread_self.c
index d2de2cb8..c3d1be78 100644
--- a/src/thread/pthread_self.c
+++ b/src/thread/pthread_self.c
@@ -27,7 +27,7 @@ static int init_main_thread()
 	main_thread.errno_ptr = __errno_location();
 	libc.errno_location = errno_location;
 	main_thread.tid = main_thread.pid = 
-		syscall1(__NR_set_tid_address, (long)&main_thread.tid);
+		syscall(SYS_set_tid_address, &main_thread.tid);
 	return 0;
 }