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:
16
C/arrays.c
16
C/arrays.c
@@ -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++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user