Update of /cvsroot/sbcl/sbcl/src/runtime
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6133/src/runtime
Modified Files:
alpha-arch.h hppa-arch.h linux-os.c mips-arch.h ppc-arch.h
sparc-arch.h x86-64-arch.h x86-arch.h
Log Message:
0.8.20.29:
Merge SB-FUTEX and SB-THREAD: the latter now requires the
former. SBCL threads now require Linux kernel 2.6, or an NPTL
backport to 2.4 such as the Red Hat one
Lock/unlock functions take long (not int) as arguments: this makes
a difference on 64 bit ports (or would do if we had threading support
on either of them)
Index: alpha-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/alpha-arch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- alpha-arch.h 25 Aug 2003 21:00:01 -0000 1.2
+++ alpha-arch.h 22 Mar 2005 14:02:21 -0000 1.3
@@ -3,7 +3,7 @@
static inline void
-get_spinlock(lispobj *word,int value)
+get_spinlock(lispobj *word,long value)
{
*word=value; /* FIXME for threads */
}
Index: hppa-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/hppa-arch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hppa-arch.h 25 Aug 2003 21:00:02 -0000 1.2
+++ hppa-arch.h 22 Mar 2005 14:02:22 -0000 1.3
@@ -3,7 +3,7 @@
static inline void
-get_spinlock(lispobj *word,int value)
+get_spinlock(lispobj *word,long value)
{
*word=value; /* FIXME for threads */
}
Index: linux-os.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/linux-os.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- linux-os.c 14 Mar 2005 09:54:49 -0000 1.36
+++ linux-os.c 22 Mar 2005 14:02:22 -0000 1.37
@@ -49,7 +49,7 @@
#include "thread.h"
size_t os_vm_page_size;
-#ifdef LISP_FEATURE_SB_FUTEX
+#ifdef LISP_FEATURE_SB_THREAD
#include <linux/unistd.h>
#include <errno.h>
@@ -73,7 +73,6 @@
#include "gc.h"
int linux_sparc_siginfo_bug = 0;
-int linux_supports_futex=0;
void os_init(void)
{
@@ -94,17 +93,16 @@
major_version);
}
if (!(major_version>2 || minor_version >= 4)) {
-#ifdef LISP_FEATURE_SB_THREAD
- lose("linux kernel 2.4 required for thread-enabled SBCL");
-#endif
#ifdef LISP_FEATURE_SPARC
FSHOW((stderr,"linux kernel %d.%d predates 2.4;\n enabling workarounds for SPARC kernel bugs in signal handling.\n", major_version,minor_version));
linux_sparc_siginfo_bug = 1;
#endif
}
-#ifdef LISP_FEATURE_SB_FUTEX
+#ifdef LISP_FEATURE_SB_THREAD
futex_wait(futex,-1);
- if(errno!=ENOSYS) linux_supports_futex=1;
+ if(errno==ENOSYS) {
+ lose("linux with NPTL support (e.g. kernel 2.6 or newer) required for thread-enabled SBCL");
+ }
#endif
os_vm_page_size = getpagesize();
}
@@ -288,13 +286,10 @@
sig_stop_for_gc_handler);
undoably_install_low_level_interrupt_handler(SIG_THREAD_EXIT,
thread_exit_handler);
- if(!linux_supports_futex)
- undoably_install_low_level_interrupt_handler(SIG_DEQUEUE,
- sigcont_handler);
#endif
}
-#ifdef LISP_FEATURE_SB_FUTEX
+#ifdef LISP_FEATURE_SB_THREAD
int futex_wait(int *lock_word, int oldval) {
int t= sys_futex(lock_word,FUTEX_WAIT,oldval, 0);
return t;
Index: mips-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/mips-arch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mips-arch.h 25 Aug 2003 21:00:02 -0000 1.2
+++ mips-arch.h 22 Mar 2005 14:02:22 -0000 1.3
@@ -3,7 +3,7 @@
static inline void
-get_spinlock(lispobj *word,int value)
+get_spinlock(lispobj *word,long value)
{
*word=value; /* FIXME for threads */
}
Index: ppc-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/ppc-arch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ppc-arch.h 25 Aug 2003 21:00:02 -0000 1.2
+++ ppc-arch.h 22 Mar 2005 14:02:22 -0000 1.3
@@ -2,7 +2,7 @@
#define _PPC_ARCH_H
static inline void
-get_spinlock(lispobj *word,int value)
+get_spinlock(lispobj *word,long value)
{
*word=value; /* FIXME for threads */
}
Index: sparc-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/sparc-arch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sparc-arch.h 25 Aug 2003 21:00:02 -0000 1.2
+++ sparc-arch.h 22 Mar 2005 14:02:22 -0000 1.3
@@ -2,7 +2,7 @@
#define _SPARC_ARCH_H
static inline void
-get_spinlock(lispobj *word,int value)
+get_spinlock(lispobj *word,long value)
{
*word=value; /* FIXME for threads */
}
Index: x86-64-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/x86-64-arch.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- x86-64-arch.h 6 Jan 2005 12:48:04 -0000 1.2
+++ x86-64-arch.h 22 Mar 2005 14:02:22 -0000 1.3
@@ -13,7 +13,7 @@
* architecture-abstracting patches for CSR's SPARC port. -- WHN 2002-02-15) */
static inline void
-get_spinlock(lispobj *word,int value)
+get_spinlock(lispobj *word,long value)
{
#if 0
u32 eax=0;
Index: x86-arch.h
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/x86-arch.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- x86-arch.h 10 Sep 2004 15:36:18 -0000 1.6
+++ x86-arch.h 22 Mar 2005 14:02:22 -0000 1.7
@@ -25,7 +25,7 @@
extern never_returns lose(char *fmt, ...);
static inline void
-get_spinlock(volatile lispobj *word,int value)
+get_spinlock(volatile lispobj *word,long value)
{
u32 eax=0;
if(*word==value)
|