From 58cbb5d0a3cd9fc14537ccc7089504c419f895eb Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Wed, 7 Apr 2010 17:23:41 +0000 Subject: [PATCH] 1.0.37.56: no more :NEW-OWNER in GRAB-MUTEX ...and I'm sorely tempted to make GET-MUTEX signal an error if the argument is anything but NIL or current thread... --- src/code/target-thread.lisp | 14 ++++---------- version.lisp-expr | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 8c7c1fe..76fb998 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -437,12 +437,10 @@ HOLDING-MUTEX-P." (waitp (bug "Failed to acquire lock with WAITP.")))))) -(defun grab-mutex (mutex &key (new-owner *current-thread*) - (waitp t) (timeout nil)) +(defun grab-mutex (mutex &key (waitp t) (timeout nil)) #!+sb-doc - "Acquire MUTEX for NEW-OWNER, which must be a thread or NIL. If -NEW-OWNER is NIL, it defaults to the current thread. If WAITP is -non-NIL and the mutex is in use, sleep until it is available. + "Acquire MUTEX for the current thread. If WAITP is true (the default) and +the mutex is not immediately available, sleep until it is available. If TIMEOUT is given, it specifies a relative timeout, in seconds, on how long GRAB-MUTEX should try to acquire the lock in the contested @@ -455,10 +453,6 @@ NIL which denotes that GRAB-MUTEX did -not- acquire the lock. Notes: - - Using the NEW-OWNER parameter to assign a MUTEX to another thread - than the current one is not recommended, and liable to be - deprecated. - - GRAB-MUTEX is not interrupt safe. The correct way to call it is: (WITHOUT-INTERRUPTS @@ -482,7 +476,7 @@ Notes: - It is recommended that you use WITH-MUTEX instead of calling GRAB-MUTEX directly. " - (get-mutex mutex new-owner waitp timeout)) + (get-mutex mutex nil waitp timeout)) (defun release-mutex (mutex &key (if-not-owner :punt)) #!+sb-doc diff --git a/version.lisp-expr b/version.lisp-expr index 37bc595..a686ca3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.37.55" +"1.0.37.56" -- 1.7.10.4