From 0dd50911630bf179a3406e3ca321631544d49b66 Mon Sep 17 00:00:00 2001 From: pmoura Date: Sun, 18 Mar 2007 13:10:23 +0000 Subject: [PATCH] The predicate mutex_property/2 now returns for the property locked/2 thread aliases, when defined, instead of thread identifiers. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1849 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- pl/threads.yap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pl/threads.yap b/pl/threads.yap index 9a000b2d0..64f2707c5 100644 --- a/pl/threads.yap +++ b/pl/threads.yap @@ -427,7 +427,9 @@ mutex_property(Mutex, Prop) :- '$mutex_property'(Id, alias(Alias)) :- recorded('$mutex_alias', [Id|Alias], _). '$mutex_property'(Id, locked(Thread, Count)) :- - '$mutex_info'(Id, Count, Thread). + '$mutex_info'(Id, Count, HoldingThread), + '$thread_id_alias'(HoldingThread, Alias), + once((Thread = Alias; Thread = HoldingThread)). message_queue_create(Cond) :- var(Cond), !,