From 51fb6a8421407c5ca5824fbd47f1334e682c0fee Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 12 Aug 2005 19:08:19 +0000 Subject: [PATCH] 0.9.3.49: Commit Tyler Berry's patch to use syscall(2) instead of _syscall on x86 linux (sbcl-devel 11 August 2005). --- src/runtime/linux-os.c | 15 +++++++-------- src/runtime/x86-linux-os.c | 8 ++++++-- version.lisp-expr | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index 25fd433..222f0af 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -55,7 +55,8 @@ size_t os_vm_page_size; #ifdef LISP_FEATURE_SB_THREAD -#include +#include +#include #include /* values taken from the kernel's linux/futex.h. This header file @@ -66,13 +67,11 @@ size_t os_vm_page_size; #define FUTEX_FD (2) #define FUTEX_REQUEUE (3) -#define __NR_sys_futex __NR_futex - -_syscall4(int,sys_futex, - int *, futex, - int, op, - int, val, - struct timespec *, rel); +#define sys_futex sbcl_sys_futex +static inline int sys_futex (void *futex, int op, int val, struct timespec *rel) +{ + return syscall (SYS_futex, futex, op, val, rel); +} int futex_wait(int *lock_word, int oldval) diff --git a/src/runtime/x86-linux-os.c b/src/runtime/x86-linux-os.c index b0615de..740d382 100644 --- a/src/runtime/x86-linux-os.c +++ b/src/runtime/x86-linux-os.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include "thread.h" /* dynamic_values_bytes */ @@ -49,7 +49,11 @@ #define user_desc modify_ldt_ldt_s #endif -_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount ); +#define modify_ldt sbcl_modify_ldt +static inline int modify_ldt (int func, void *ptr, unsigned long bytecount) +{ + return syscall (SYS_modify_ldt, func, ptr, bytecount); +} #include "validate.h" size_t os_vm_page_size; diff --git a/version.lisp-expr b/version.lisp-expr index 0ed0b23..c3ae8b2 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.3.48" +"0.9.3.49" -- 1.7.10.4