X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Flinux-os.c;h=fbc888e5579a9806d7c13bbeb34fe5d15df29e15;hb=638197e01ef6d5365852758c072b2b102fdceaa6;hp=faf1a4729c1a4688a982a2af9a9e3f039283b131;hpb=402958f92506b9d3de852601b8c1ccb99b5ee558;p=sbcl.git diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index faf1a47..fbc888e 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -84,7 +84,18 @@ static inline int sys_futex (void *futex, int op, int val, struct timespec *rel) int futex_wait(int *lock_word, int oldval) { - int t= sys_futex(lock_word,FUTEX_WAIT,oldval, 0); + int t; + again: + t = sys_futex(lock_word,FUTEX_WAIT,oldval, 0); + + /* Interrupted FUTEX_WAIT calls may return early. + * + * If someone manages to wake the futex while we're spinning + * around it, we will just return with -1 and errno EWOULDBLOCK, + * because the value has changed, so that's ok. */ + if (t != 0 && errno == EINTR) + goto again; + return t; } @@ -98,6 +109,21 @@ futex_wake(int *lock_word, int n) int linux_sparc_siginfo_bug = 0; +/* This variable was in real use for a few months, basically for + * storing autodetected information about whether the Linux + * installation was recent enough to support SBCL threads, and make + * some run-time decisions based on that. But this turned out to be + * unstable, so now we just flat-out refuse to start on the old installations + * when thread support has been compiled in. + * + * Unfortunately, in the meanwhile Slime started depending on this + * variable for deciding which communication style to use. So even + * though this variable looks unused, it shouldn't be deleted until + * it's no longer used in the versions of Slime that people are + * likely to download first. -- JES, 2006-06-07 + */ +int linux_no_threads_p = 0; + #ifdef LISP_FEATURE_SB_THREAD int isnptl (void)