more threadin fixes

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2300 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2008-08-07 20:51:23 +00:00
parent 6d23a23a81
commit 2581c3a3bf
15 changed files with 221 additions and 153 deletions

View File

@@ -732,15 +732,15 @@ ClearStaticArray(StaticArrayEntry *pp)
if (ptr->Flags & LogUpdMask) {
LogUpdClause *lup = (LogUpdClause *)ptr;
LOCK(lup->ClLock);
// LOCK(lup->ClLock);
lup->ClRefCount--;
if (lup->ClRefCount == 0 &&
(lup->ClFlags & ErasedMask) &&
!(lup->ClFlags & InUseMask)) {
UNLOCK(lup->ClLock);
// UNLOCK(lup->ClLock);
Yap_ErLogUpdCl(lup);
} else {
UNLOCK(lup->ClLock);
// UNLOCK(lup->ClLock);
}
} else {
ptr->NOfRefsTo--;
@@ -1836,15 +1836,15 @@ p_assign_static(void)
if (ptr->Flags & LogUpdMask) {
LogUpdClause *lup = (LogUpdClause *)ptr;
LOCK(lup->ClLock);
// LOCK(lup->ClLock);
lup->ClRefCount--;
if (lup->ClRefCount == 0 &&
(lup->ClFlags & ErasedMask) &&
!(lup->ClFlags & InUseMask)) {
UNLOCK(lup->ClLock);
// UNLOCK(lup->ClLock);
Yap_ErLogUpdCl(lup);
} else {
UNLOCK(lup->ClLock);
// UNLOCK(lup->ClLock);
}
} else {
ptr->NOfRefsTo--;
@@ -1858,9 +1858,9 @@ p_assign_static(void)
if (p->Flags & LogUpdMask) {
LogUpdClause *lup = (LogUpdClause *)p;
LOCK(lup->ClLock);
// LOCK(lup->ClLock);
lup->ClRefCount++;
UNLOCK(lup->ClLock);
// UNLOCK(lup->ClLock);
} else {
p->NOfRefsTo++;
}