X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-unithread.lisp;fp=src%2Fcode%2Ftarget-unithread.lisp;h=e7a1917178b55d114187441874dc92ae401535ed;hb=c10e4afc31e25003cc2500803ceb7589232e7f6b;hp=c79c0119c4e4cd08d8932ad360617b3357ffb836;hpb=ef1534f00fcf9d5554a91c70485b4ede40fdcb4f;p=sbcl.git diff --git a/src/code/target-unithread.lisp b/src/code/target-unithread.lisp index c79c011..e7a1917 100644 --- a/src/code/target-unithread.lisp +++ b/src/code/target-unithread.lisp @@ -1,5 +1,11 @@ (in-package "SB!THREAD") +#-sb-fluid (declaim (inline sb!vm::current-thread-offset-sap)) +(defun sb!vm::current-thread-offset-sap (n) + (declare (type (unsigned-byte 27) n)) + (sb!sys:sap-ref-sap (alien-sap (extern-alien "all_threads" (* t))) + (* n 4))) + (defun current-thread-id () (sb!sys:sap-int (sb!vm::current-thread-offset-sap sb!vm::thread-pid-slot)))