#+sb-thread
(defun thread-pids ()
"Return a list of the pids for all threads"
- (let ((offset (* 4 sb-vm::thread-pid-slot)))
+ (let ((offset (* 4 sb-vm::thread-os-thread-slot)))
(sb-thread::mapcar-threads
#'(lambda (sap) (sb-sys:sap-ref-32 sap offset)))))
(values))
(defun reset-cmd ()
- (invoke-restart-interactively (find-restart 'sb-impl::toplevel)))
+ (throw 'sb-impl::toplevel-catcher nil))
(defun dirs-cmd ()
(dolist (dir *dir-stack*)
(and (characterp x)
(or (char= x #\space)
(char= x #\tab)
+ (char= x #\page)
(char= x #\newline)
(char= x #\return))))
(defun whitespace-char-not-newline-p (x)
(and (whitespace-char-p x)
(not (char= x #\newline))))
-
\f
;;;; linking into SBCL hooks
-
(defun repl-prompt-fun (stream)
(let ((break-level (when (plusp *break-level*)
*break-level*))
(frame-number (when (and (plusp *break-level*)
sb-debug::*current-frame*)
(sb-di::frame-number sb-debug::*current-frame*))))
- #+sb-thread
- (let ((lock sb-thread::*session-lock*))
- (sb-thread::get-foreground)
- (let ((stopped-threads (sb-thread::waitqueue-data lock)))
- (when stopped-threads
- (format stream "~{~&Thread ~A suspended~}~%" stopped-threads))))
+ (sb-thread::get-foreground)
(fresh-line stream)
(if (functionp *prompt*)
(write-string (funcall *prompt*
((eq (user-cmd-func user-cmd) :cmd-error)
(format *output* "Unknown top-level command: ~s.~%"
(user-cmd-input user-cmd))
- (format *output* "Type `:help' for the list of commands.~%")
+ (format *output* "Type `~Ahelp' for the list of commands.~%" *command-char*)
t)
((eq (user-cmd-func user-cmd) :history-error)
(format *output* "Input numbered ~d is not on the history list~%"