Greetings Dave,
I am wondering why there is a TO DO above this code:
* ToDo: tlocks should be on doubly-linked list, so we can
* quickly remove it and add it to the end.
*/
/*
* Move parent page's tlock to the end of the tid's tlock list
*/
if (log && mp->lid && (tblk->last != mp->lid) &&
lid_to_tlock(mp->lid)->tid) {
lid_t lid = mp->lid;
struct tlock *prev;
tlck = lid_to_tlock(lid);
if (tblk->next == lid)
tblk->next = tlck->next;
else {
for (prev = lid_to_tlock(tblk->next);
prev->next != lid;
prev = lid_to_tlock(prev->next)) {
assert(prev->next);
}
prev->next = tlck->next;
}
lid_to_tlock(tblk->last)->next = lid;
tlck->next = 0;
tblk->last = lid;
}
As this code clearly moves the locks onto a linked list. Therefore I am
recommend we remove this
TO DO as this is clearly misleading and no longer needed.
Thanks,
Nick
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion