X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fcode%2Ftarget-unithread.lisp;h=1d5a4949c435c98f990a2506f27f68860d3652b6;hb=bb756e3d4b19c30d4a9cd4250b606c5969613ad9;hp=e1619371a0d3f7f3cc85ac4909affc31d24c52e4;hpb=cd056980425e3fa67b8b77de3936ccb46508c3b0;p=sbcl.git diff --git a/src/code/target-unithread.lisp b/src/code/target-unithread.lisp index e161937..1d5a494 100644 --- a/src/code/target-unithread.lisp +++ b/src/code/target-unithread.lisp @@ -13,18 +13,12 @@ ;;; used bu debug-int.lisp to access interrupt contexts #!-sb-fluid (declaim (inline sb!vm::current-thread-offset-sap)) -(defun sb!vm::current-thread-offset-sap (n) +(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 sb!vm:n-word-bytes))) + (sb!sys:sap-ref-sap (alien-sap (extern-alien "all_threads" (* t))) + (* n sb!vm:n-word-bytes))) -(defun current-thread-id () - (sb!sys:sap-ref-32 (alien-sap (extern-alien "all_threads" (* t))) - (* sb!vm::thread-pid-slot sb!vm:n-word-bytes))) - -(defun reap-dead-threads ()) - -;;;; queues, locks +;;;; queues, locks ;; spinlocks use 0 as "free" value: higher-level locks use NIL (defun get-spinlock (lock offset new-value) @@ -52,7 +46,7 @@ (when (and old-value wait-p) (error "In unithread mode, mutex ~S was requested with WAIT-P ~S and ~ new-value ~S, but has already been acquired (with value ~S)." - lock wait-p new-value old-value)) + lock wait-p new-value old-value)) (setf (mutex-value lock) new-value) t)) @@ -61,7 +55,7 @@ (setf (mutex-value lock) nil)) -;; FIXME need suitable stub or ERROR-signaling definitions for +;; FIXME need suitable stub or ERROR-signaling definitions for ;; condition-wait (queue lock) ;; condition-notify (queue)