proclaim *CURRENT-THREAD* as always-bound
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 18 Sep 2012 21:37:47 +0000 (00:37 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 22 Sep 2012 19:45:19 +0000 (22:45 +0300)
   Eliminates quite a few "check if it's bound" cases from the system, and
   protects against MAKUNBOUND.

src/code/early-thread.lisp
src/code/thread.lisp

index bbdce56..7134b67 100644 (file)
@@ -9,4 +9,5 @@
 
 (in-package "SB!THREAD")
 
-(defvar *current-thread*)
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (defvar *current-thread* nil))
index bbd9e30..e45fa64 100644 (file)
@@ -11,6 +11,9 @@
 
 (in-package "SB!THREAD")
 
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (sb!xc:proclaim '(sb!ext:always-bound *current-thread*)))
+
 (def!type thread-name ()
   'simple-string)