;;;; job control
(defvar *background-threads-wait-for-debugger* t)
-;;; may be T, NIL, or a function called with an fd-stream and thread id
+;;; may be T, NIL, or a function called with a stream and thread id
;;; as its two arguments, returning NIl or T
;;; called from top of invoke-debugger
restart if *BACKGROUND-THREADS-WAIT-FOR-DEBUGGER* says to do that instead"
(let* ((wait-p *background-threads-wait-for-debugger*)
(*background-threads-wait-for-debugger* nil)
- (fd-stream (sb!impl::get-underlying-stream stream :input))
(lock *session-lock*))
(when (not (eql (mutex-value lock) (CURRENT-THREAD-ID)))
(when (functionp wait-p)
(setf wait-p
- (funcall wait-p fd-stream (CURRENT-THREAD-ID))))
+ (funcall wait-p stream (CURRENT-THREAD-ID))))
(cond (wait-p (get-foreground))
(t (invoke-restart (car (compute-restarts))))))))
#include "genesis/vector.h"
#include "genesis/weak-pointer.h"
#include "genesis/simple-fun.h"
+
+#ifdef LISP_FEATURE_SB_THREAD
+#include <sys/ptrace.h>
+#include <linux/user.h> /* threading is presently linux-only */
+#endif
+
/* assembly language stub that executes trap_PendingInterrupt */
void do_pending_interrupt(void);
lispobj *current_auto_gc_trigger;
#endif
+#ifdef LISP_FEATURE_SB_THREAD
+pid_t parent_pid;
+boolean stop_the_world=0;
+#endif
+
/* For copying GCs, this points to the start of the dynamic space
* currently in use (that will become the from_space when the next GC
* is done). For the GENCGC, it always points to DYNAMIC_SPACE_START. */
extern lispobj *current_dynamic_space;
extern pid_t parent_pid;
+extern boolean stop_the_world;
extern void globals_init(void);
if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0)
/* modify_ldt call failed: something magical is not happening */
return -1;
- __asm__ __volatile__ ("movw %w0, %%gs" : : "q"
+ __asm__ __volatile__ ("movw %w0, %%fs" : : "q"
((n << 3) /* selector number */
+ (1 << 2) /* TI set = LDT */
+ 3)); /* privilege level */
#ifdef LISP_FEATURE_SB_THREAD
register struct thread *me=0;
if(all_threads)
- __asm__ ("movl %%gs:%c1,%0" : "=r" (me)
+ __asm__ ("movl %%fs:%c1,%0" : "=r" (me)
: "i" (offsetof (struct thread,this)));
return me;
#else
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre8.28"
+"0.pre8.29"