projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test for multiply-interrupted sleeps
[sbcl.git]
/
src
/
code
/
target-thread.lisp
diff --git
a/src/code/target-thread.lisp
b/src/code/target-thread.lisp
index
18bec35
..
038dad0
100644
(file)
--- a/
src/code/target-thread.lisp
+++ b/
src/code/target-thread.lisp
@@
-301,7
+301,7
@@
created and old ones may exit at any time."
(defmacro with-deadlocks ((thread lock &optional timeout) &body forms)
(declare (ignorable timeout))
(defmacro with-deadlocks ((thread lock &optional timeout) &body forms)
(declare (ignorable timeout))
- (with-unique-names (prev n-thread n-lock n-timeout new)
+ (with-unique-names (n-thread n-lock n-timeout new)
`(let* ((,n-thread ,thread)
(,n-lock ,lock)
(,n-timeout #!-sb-lutex
`(let* ((,n-thread ,thread)
(,n-lock ,lock)
(,n-timeout #!-sb-lutex
@@
-309,8
+309,6
@@
created and old ones may exit at any time."
`(or ,timeout
(when sb!impl::*deadline*
sb!impl::*deadline-seconds*))))
`(or ,timeout
(when sb!impl::*deadline*
sb!impl::*deadline-seconds*))))
- ;; If we get interrupted while waiting for a lock, etc.
- (,prev (thread-waiting-for ,n-thread))
(,new (if ,n-timeout
(cons ,n-timeout ,n-lock)
,n-lock)))
(,new (if ,n-timeout
(cons ,n-timeout ,n-lock)
,n-lock)))
@@
-321,7
+319,9
@@
created and old ones may exit at any time."
(progn
(setf (thread-waiting-for ,n-thread) ,new)
,@forms)
(progn
(setf (thread-waiting-for ,n-thread) ,new)
,@forms)
- (setf (thread-waiting-for ,n-thread) ,prev)))))
+ ;; Interrupt handlers and GC save and restore any
+ ;; previous wait marks using WITHOUT-DEADLOCKS below.
+ (setf (thread-waiting-for ,n-thread) nil)))))
(declaim (inline get-spinlock release-spinlock))
(declaim (inline get-spinlock release-spinlock))