more thread work to cean-up mutexes. Not finshed yet

This commit is contained in:
Vitor Santos Costa
2014-11-25 19:52:51 +00:00
parent afc6c5d04e
commit 624183b78e
8 changed files with 83 additions and 453 deletions

View File

@@ -944,13 +944,13 @@ static Int init_current_predicate(USES_REGS1) {
if (IsExtensionFunctor(f)) {
Yap_Error(TYPE_ERROR_CALLABLE, t3, "current_predicate/2");
cut_fail();
return FALSE;
}
at = NameOfFunctor(f);
arity = ArityOfFunctor(f);
}
if (IsAtomTerm(t2)) // we know the module and the main predicate
// so that we are deterministic
{
if (arity == 0) {
if (Yap_GetPredPropByAtom(at, t2) != NIL &&
Yap_unify(ARG1, MkAtomTerm(at)))