insert some more slack for indices in LU
Use doubly linked list for LU indices so that updating is less cumbersome. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1316 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
19
C/cdmgr.c
19
C/cdmgr.c
@@ -11,8 +11,11 @@
|
||||
* File: cdmgr.c *
|
||||
* comments: Code manager *
|
||||
* *
|
||||
* Last rev: $Date: 2005-05-31 00:30:23 $,$Author: ricroc $ *
|
||||
* Last rev: $Date: 2005-05-31 19:42:27 $,$Author: vsc $ *
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.158 2005/05/31 00:30:23 ricroc
|
||||
* remove abort_yapor function
|
||||
*
|
||||
* Revision 1.157 2005/05/12 03:36:32 vsc
|
||||
* debugger was making predicates meta instead of testing
|
||||
* fix handling of dbrefs in facts and in subarguments.
|
||||
@@ -923,12 +926,16 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap)
|
||||
LOCK(parent->ClLock);
|
||||
if (c == parent->ChildIndex) {
|
||||
parent->ChildIndex = c->SiblingIndex;
|
||||
} else {
|
||||
LogUpdIndex *tcl = parent->ChildIndex;
|
||||
while (tcl->SiblingIndex != c) {
|
||||
tcl = tcl->SiblingIndex;
|
||||
if (parent->ChildIndex) {
|
||||
parent->ChildIndex->PrevSiblingIndex = NULL;
|
||||
}
|
||||
} else {
|
||||
c->PrevSiblingIndex->SiblingIndex =
|
||||
c->SiblingIndex;
|
||||
if (c->SiblingIndex) {
|
||||
c->SiblingIndex->PrevSiblingIndex =
|
||||
c->PrevSiblingIndex;
|
||||
}
|
||||
tcl->SiblingIndex = c->SiblingIndex;
|
||||
}
|
||||
UNLOCK(parent->ClLock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user