projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ccd934
)
Signal an error in unlock-thread-mutex when mutex is not owned,
author
Matt Birkholz
<matt@birchwood-abbey.net>
Tue, 5 Jun 2018 07:22:28 +0000
(
00:22
-0700)
committer
Matt Birkholz
<matt@birchwood-abbey.net>
Tue, 5 Jun 2018 07:22:28 +0000
(
00:22
-0700)
before applying remove-thread-mutex! to #f, which produces a less
helpful error message.
src/runtime/thread.scm
patch
|
blob
|
history
diff --git
a/src/runtime/thread.scm
b/src/runtime/thread.scm
index 5ea1867f924ad50cdc8f579d55c367c8e74a35d7..693aacd28ad626ff5abfa8610f925d6a68cfb38d 100644
(file)
--- a/
src/runtime/thread.scm
+++ b/
src/runtime/thread.scm
@@
-1211,7
+1211,8
@@
USA.
(without-interrupts
(lambda ()
(let ((owner (thread-mutex/owner mutex)))
- (if (and owner (not (eq? owner (current-thread))))
+ (if (or (not owner)
+ (not (eq? owner (current-thread))))
(error "Don't own mutex:" mutex))
(%unlock-thread-mutex mutex owner)))))