Slightly nicer behaviour on non-NPTL systems makes it possible
to use thread-enabled binaries in thread-unfriendly environments again
- but a warning is issued at startup and MAKE-THREAD signals an error
Remove some slightly odd-looking stuff in make-config.sh: once
again it is possible to "SBCL_ARCH=x86 sh make.sh" on an x86-64
changes in sbcl-0.8.21 (0.9alpha.1?) relative to sbcl-0.8.20:
* incompatible change: thread support for non-NPTL systems has
been removed - locking is buggy and unreliable. A threaded
changes in sbcl-0.8.21 (0.9alpha.1?) relative to sbcl-0.8.20:
* incompatible change: thread support for non-NPTL systems has
been removed - locking is buggy and unreliable. A threaded
- SBCL build will now refuse to start unless futex support is
- detected in the kernel
+ SBCL build will now warn at startup and refuse to create
+ new threads, unless futex support is detected in the kernel
* incompatible change: the top level REPL now has only an ABORT
restart associated with it, not TOPLEVEL and ABORT as it used to.
TOP and TOPLEVEL are now available as debugger commands for
* incompatible change: the top level REPL now has only an ABORT
restart associated with it, not TOPLEVEL and ABORT as it used to.
TOP and TOPLEVEL are now available as debugger commands for
Linux)
printf ' :linux' >> $ltf
sbcl_os="linux"
Linux)
printf ' :linux' >> $ltf
sbcl_os="linux"
- if [ "`uname -m`" = "x86_64" ]; then
- ln -s Config.x86_64-linux Config
- else
- ln -s Config.$sbcl_arch-linux Config
- fi
+ ln -s Config.$sbcl_arch-linux Config
ln -s $sbcl_arch-linux-os.h target-arch-os.h
ln -s linux-os.h target-os.h
;;
ln -s $sbcl_arch-linux-os.h target-arch-os.h
ln -s linux-os.h target-os.h
;;
(funcall real-function))
0))
(values))))))
(funcall real-function))
0))
(values))))))
+ (when (zerop tid) (error "Can't create a new thread"))
(with-mutex ((session-lock *session*))
(pushnew tid (session-threads *session*)))
tid))
(with-mutex ((session-lock *session*))
(pushnew tid (session-threads *session*)))
tid))
#include "gc.h"
\f
int linux_sparc_siginfo_bug = 0;
#include "gc.h"
\f
int linux_sparc_siginfo_bug = 0;
+int linux_no_threads_p = 0;
}
#ifdef LISP_FEATURE_SB_THREAD
futex_wait(futex,-1);
}
#ifdef LISP_FEATURE_SB_THREAD
futex_wait(futex,-1);
- if(errno==ENOSYS) {
- lose("linux with NPTL support (e.g. kernel 2.6 or newer) required for thread-enabled SBCL");
- }
+ if(errno==ENOSYS) linux_no_threads_p = 1;
+ if(linux_no_threads_p)
+ fprintf(stderr,"Linux with NPTL support (e.g. kernel 2.6 or newer) required for \nthread-enabled SBCL. Disabling thread support.\n\n");
#endif
os_vm_page_size = getpagesize();
}
#endif
os_vm_page_size = getpagesize();
}
struct thread *all_threads;
volatile lispobj all_threads_lock;
extern struct interrupt_data * global_interrupt_data;
struct thread *all_threads;
volatile lispobj all_threads_lock;
extern struct interrupt_data * global_interrupt_data;
+extern int linux_no_threads_p;
int
initial_thread_trampoline(struct thread *th)
int
initial_thread_trampoline(struct thread *th)
#ifdef LISP_FEATURE_SB_THREAD
pid_t create_thread(lispobj initial_function) {
#ifdef LISP_FEATURE_SB_THREAD
pid_t create_thread(lispobj initial_function) {
- struct thread *th=create_thread_struct(initial_function);
+ if(linux_no_threads_p) return 0;
+ th=create_thread_struct(initial_function);
if(th==0) return 0;
kid_pid=clone(new_thread_trampoline,
(((void*)th->control_stack_start)+
if(th==0) return 0;
kid_pid=clone(new_thread_trampoline,
(((void*)th->control_stack_start)+
;;; 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".)
;;; 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".)