From 0ce8ffe36b5c45068e02118aced4d0f32046ceff Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 11 Mar 2018 10:07:13 -0700 Subject: [PATCH] runtime: Unlock mutexes more carefully. md5-string NOT deprecated. --- src/runtime/runtime.pkg | 3 ++- src/runtime/thread.scm | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index bfcef14df..f509528ba 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -5063,7 +5063,8 @@ USA. mcrypt-open-module mcrypt-self-test mcrypt-supported-key-sizes - md5-available? + md5-available?) + (export () md5-bytevector md5-file md5-string) diff --git a/src/runtime/thread.scm b/src/runtime/thread.scm index 8fce69f9e..dec9b6362 100644 --- a/src/runtime/thread.scm +++ b/src/runtime/thread.scm @@ -1216,7 +1216,9 @@ USA. (without-interrupts (lambda () (let ((owner (thread-mutex/owner mutex))) - (if (and owner (not (eq? owner (current-thread)))) + (if (not owner) + (error "Unowned mutex:" mutex)) + (if (not (eq? owner (current-thread))) (error "Don't own mutex:" mutex)) (%unlock-thread-mutex mutex owner))))) -- 2.25.1