X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Ftarget-thread.lisp;h=3493cfce2f4897fa7a034edb9a02575174f34a64;hb=8eee0d3a30bf39d9f201acff28c92059fe6c3e4e;hp=c534ca01fb2e94e0b61973ecc1322602059ac56a;hpb=9cbef67c0d16955fc77a555e7ad251d93e206524;p=sbcl.git diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index c534ca0..3493cfc 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -266,8 +266,13 @@ directly." #!-sb-thread (ignore waitp)) (unless new-owner (setq new-owner *current-thread*)) - (when (eql new-owner (mutex-%owner mutex)) - (error "Recursive lock attempt ~S." mutex)) + (let ((old (mutex-%owner mutex))) + (when (eq new-owner old) + (error "Recursive lock attempt ~S." mutex)) + #!-sb-thread + (if old + (error "Strange deadlock on ~S in an unithreaded build?" mutex) + (setf (mutex-%owner mutex) new-owner))) #!+sb-thread (progn ;; FIXME: Lutexes do not currently support deadlines, as at least