0.9.2.14:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sat, 2 Jul 2005 15:33:46 +0000 (15:33 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sat, 2 Jul 2005 15:33:46 +0000 (15:33 +0000)
Make it build, at least, on sparc.

src/code/target-thread.lisp
src/runtime/thread.c
version.lisp-expr

index 176eeb6..dd25ecb 100644 (file)
 
 (defun thread-state (thread)
   (let ((state
-         (sb!kernel:make-lisp-obj
-          (sb!sys:sap-int
-           (sb!sys:sap-ref-sap (thread-%sap thread)
-                               (* sb!vm::thread-state-slot
-                                  sb!vm::n-word-bytes))))))
+        (sb!sys:sap-int
+         (sb!sys:sap-ref-sap (thread-%sap thread)
+                             (* sb!vm::thread-state-slot
+                                sb!vm::n-word-bytes)))))
     (ecase state
-      (0 :starting)
-      (1 :running)
-      (2 :suspended)
-      (3 :dead))))
+      (#.(sb!vm:fixnumize 0) :starting)
+      (#.(sb!vm:fixnumize 1) :running)
+      (#.(sb!vm:fixnumize 2) :suspended)
+      (#.(sb!vm:fixnumize 3) :dead))))
 
 (defun %set-thread-state (thread state)
   (setf (sb!sys:sap-ref-sap (thread-%sap thread)
                             (* sb!vm::thread-state-slot
                                sb!vm::n-word-bytes))
         (sb!sys:int-sap
-         (sb!kernel:get-lisp-obj-address
-          (ecase state
-            (:starting 0)
-            (:running 1)
-            (:suspended 2)
-            (:dead 3))))))
+         (ecase state
+           (:starting #.(sb!vm:fixnumize 0))
+           (:running #.(sb!vm:fixnumize 1))
+           (:suspended #.(sb!vm:fixnumize 2))
+           (:dead #.(sb!vm:fixnumize 3))))))
 
 (defun thread-alive-p (thread)
   (not (eq :dead (thread-state thread))))
index 4b39120..dc3fb2d 100644 (file)
@@ -31,6 +31,7 @@ volatile lispobj all_threads_lock;
 extern struct interrupt_data * global_interrupt_data;
 extern int linux_no_threads_p;
 
+#ifdef LISP_FEATURE_SB_THREAD
 /* When trying to get all_threads_lock one should make sure that
  * sig_stop_for_gc is not blocked. Else there would be a possible
  * deadlock: gc locks it, other thread blocks signals, gc sends stop
@@ -74,6 +75,7 @@ void check_sig_stop_for_gc_can_arrive_or_lose()
         release_spinlock(&all_threads_lock); \
         thread_sigmask(SIG_SETMASK,&_oldset,0); \
     }
+#endif
 
 int
 initial_thread_trampoline(struct thread *th)
index b0f8749..a448bc9 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.2.13"
+"0.9.2.14"