From da1961679658a69099d693a7e11a22fd8c19f4eb Mon Sep 17 00:00:00 2001 From: vsc Date: Fri, 16 Mar 2007 21:58:45 +0000 Subject: [PATCH] fix mutex_info git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1848 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/threads.c | 6 +++--- changes-5.1.html | 2 ++ docs/index/lp.bib | 11 +++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/C/threads.c b/C/threads.c index 5560d7e38..453f7dfa2 100644 --- a/C/threads.c +++ b/C/threads.c @@ -467,12 +467,12 @@ p_unlock_mutex(void) } static Int -p_info_mutex(void) +p_mutex_info(void) { SWIMutex *mut = (SWIMutex*)IntegerOfTerm(Deref(ARG1)); return Yap_unify(ARG2, MkIntegerTerm(mut->owners)) && - Yap_unify(ARG2, MkIntegerTerm(mut->tid_own)); + Yap_unify(ARG3, MkIntegerTerm(mut->tid_own)); return TRUE; } @@ -605,7 +605,7 @@ void Yap_InitThreadPreds(void) Yap_InitCPred("$lock_mutex", 1, p_lock_mutex, SafePredFlag|HiddenPredFlag); Yap_InitCPred("$trylock_mutex", 1, p_trylock_mutex, SafePredFlag|HiddenPredFlag); Yap_InitCPred("$unlock_mutex", 1, p_unlock_mutex, SafePredFlag|HiddenPredFlag); - Yap_InitCPred("$info_mutex", 2, p_info_mutex, SafePredFlag|HiddenPredFlag); + Yap_InitCPred("$mutex_info", 3, p_mutex_info, SafePredFlag|HiddenPredFlag); Yap_InitCPred("$cond_create", 1, p_cond_create, SafePredFlag|HiddenPredFlag); Yap_InitCPred("$cond_destroy", 1, p_cond_destroy, SafePredFlag|HiddenPredFlag); Yap_InitCPred("$cond_signal", 1, p_cond_signal, SafePredFlag|HiddenPredFlag); diff --git a/changes-5.1.html b/changes-5.1.html index beb953487..b9084dcc2 100644 --- a/changes-5.1.html +++ b/changes-5.1.html @@ -16,6 +16,8 @@

Yap-5.1.2: