From: Nikodemus Siivola Date: Tue, 18 Sep 2012 21:37:47 +0000 (+0300) Subject: proclaim *CURRENT-THREAD* as always-bound X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=a383077912ed97ce05533500174617ca318f7196;p=sbcl.git proclaim *CURRENT-THREAD* as always-bound Eliminates quite a few "check if it's bound" cases from the system, and protects against MAKUNBOUND. --- diff --git a/src/code/early-thread.lisp b/src/code/early-thread.lisp index bbdce56..7134b67 100644 --- a/src/code/early-thread.lisp +++ b/src/code/early-thread.lisp @@ -9,4 +9,5 @@ (in-package "SB!THREAD") -(defvar *current-thread*) +(eval-when (:compile-toplevel :load-toplevel :execute) + (defvar *current-thread* nil)) diff --git a/src/code/thread.lisp b/src/code/thread.lisp index bbd9e30..e45fa64 100644 --- a/src/code/thread.lisp +++ b/src/code/thread.lisp @@ -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)