X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Ftarget-thread.lisp;h=8723a7f984006de10cefef758d458b26cefed377;hb=344a1f088581303c92da333ddddc9aeb9c212ba9;hp=111f92be2f166c7ac874c557d306bea64b7ef8d2;hpb=4fa1c71c7dfa5c6d361304321cc67069a6410694;p=sbcl.git diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 111f92b..8723a7f 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -527,6 +527,10 @@ IF-NOT-OWNER is :FORCE)." #!-sb-lutex (token nil)) +(def!method print-object ((waitqueue waitqueue) stream) + (print-unreadable-object (waitqueue stream :type t :identity t) + (format stream "~@[~A~]" (waitqueue-name waitqueue)))) + (defun make-waitqueue (&key name) #!+sb-doc "Create a waitqueue." @@ -1192,7 +1196,24 @@ SB-EXT:QUIT - the usual cleanup forms will be evaluated" (setf (sap-ref-word (%thread-sap thread) offset) (get-lisp-obj-address value)) (values value :ok)))) - (values nil :thread-dead)))))) + (values nil :thread-dead))))) + + (define-alien-variable tls-index-start unsigned-int) + + ;; Get values from the TLS. + (defun %thread-local-values (thread) + (without-gcing + (when (thread-alive-p thread) + (let ((sap (%thread-sap thread))) + (loop for index from tls-index-start below + (symbol-value 'sb!vm::*free-tls-index*) + for value = (sap-ref-word sap (* sb!vm:n-word-bytes index)) + for obj = (sb!kernel:make-lisp-obj value nil) + unless (or (typep obj '(or boolean fixnum character)) + (member value + '(#.sb!vm:no-tls-value-marker-widetag + #.sb!vm:unbound-marker-widetag))) + collect obj)))))) (defun symbol-value-in-thread (symbol thread &optional (errorp t)) "Return the local value of SYMBOL in THREAD, and a secondary value of T