From 0e447436b367d876a172520a0113a3044c6cfc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 1 Mar 2011 10:32:25 +0000 Subject: [PATCH] fix missing lock in OpInfo --- C/c_interface.c | 1 + packages/PLStream/pl-yap.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/C/c_interface.c b/C/c_interface.c index 16aeffa98..f8e41d353 100755 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -3597,6 +3597,7 @@ int YAP_OpInfo(Atom at, Term module, int opkind, int *yap_type, int *prio) } } *yap_type = n; + WRITE_UNLOCK(ae->ARWLock); return 1; } diff --git a/packages/PLStream/pl-yap.c b/packages/PLStream/pl-yap.c index 6fc83e22e..f59e1a035 100755 --- a/packages/PLStream/pl-yap.c +++ b/packages/PLStream/pl-yap.c @@ -517,8 +517,9 @@ currentOperator(Module m, atom_t name, int kind, int *type, int *priority) default: opkind = 1; } - if (!YAP_OpInfo(YAP_AtomFromSWIAtom(name), mod, opkind, &yap_type, priority)) + if (!YAP_OpInfo(YAP_AtomFromSWIAtom(name), mod, opkind, &yap_type, priority)) { return FALSE; + } switch(yap_type) { case 1: *type = OP_XFX;