From a383077912ed97ce05533500174617ca318f7196 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Wed, 19 Sep 2012 00:37:47 +0300 Subject: [PATCH] proclaim *CURRENT-THREAD* as always-bound Eliminates quite a few "check if it's bound" cases from the system, and protects against MAKUNBOUND. --- src/code/early-thread.lisp | 3 ++- src/code/thread.lisp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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) -- 1.7.10.4