[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] master: Shake SB-THREAD harder
From:       Douglas Katzman via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date:       2020-06-30 21:15:45
Message-ID: 1593551745.563459.30338 () sfp-scm-2 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  884edfb90abbf93194688064eba0b34e376af122 (commit)
      from  b8f81b2b64d76e7b02dbf57d902f1cd1b7158d47 (commit)

- Log -----------------------------------------------------------------
commit 884edfb90abbf93194688064eba0b34e376af122
Author: Douglas Katzman <dougk@google.com>
Date:   Tue Jun 30 17:15:00 2020 -0400

    Shake SB-THREAD harder
---
 make-target-2-load.lisp     |  1 +
 src/code/target-thread.lisp | 14 +++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/make-target-2-load.lisp b/make-target-2-load.lisp
index cd8428127..e2d1b7a4b 100644
--- a/make-target-2-load.lisp
+++ b/make-target-2-load.lisp
@@ -393,6 +393,7 @@ Please check that all strings which were not recognizable to the compiler
         #.(find-package "SB-PCL")
         #.(find-package "SB-MOP")
         #.(find-package "SB-PRETTY")
+        #.(find-package "SB-THREAD")
         #.(find-package "SB-KERNEL"))
        ;; Assume all and only external symbols must be retained
        (eq accessibility :external))
diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp
index 90eba191e..c6de3cd2b 100644
--- a/src/code/target-thread.lisp
+++ b/src/code/target-thread.lisp
@@ -11,6 +11,17 @@
 
 (in-package "SB-THREAD")
 
+;;; symbols to protect from tree-shaker, for some tests
+(export '(%thread-local-references
+          current-thread-sap
+          get-spinlock
+          pthread-kill
+          raise
+          release-spinlock
+          spinlock
+          with-session-lock
+          with-spinlock))
+
 ;;; CAS Lock
 ;;;
 ;;; Locks don't come any simpler -- or more lightweight than this. While
@@ -1787,9 +1798,6 @@ subject to change."
 
 ;;; A macro, because the OS-THREAD slot holds a WORD which could cause boxing if passed
 ;;; to a function.
-;;; Incidentally, this macro is used in a test, which means that it would have
-;;; to be protected from the tree-shaker, which isn't removing it because we don't
-;;; seem to remove symbols from SB-THREAD, but we should.
 (defmacro pthread-kill (os-thread signal)
   (declare (ignorable os-thread))
   ;; If no threads, pthread_kill() won't exist since we didn't link with -lpthread.

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL


_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic