From: Daniel B. <da...@us...> - 2003-04-04 14:46:57
|
Update of /cvsroot/sbcl/sbcl/src/code In directory sc8-pr-cvs1:/tmp/cvs-serv1394/src/code Modified Files: target-unithread.lisp Log Message: 0.pre8.34 === Threads merge, 1.5625 metres === Reimplement CURRENT-THREAD-OFFSET-SAP using aliens on non-x86 targets - should make other non-x86 targets easier to fix. Immediate effect is that control stack exhaustion checking now works on PPC. Index: target-unithread.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/code/target-unithread.lisp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- target-unithread.lisp 2 Apr 2003 14:01:38 -0000 1.1 +++ target-unithread.lisp 4 Apr 2003 14:46:22 -0000 1.2 @@ -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))) |