based on complaint from and work with jimmy@e.kth.se
h_OtherHolds_r will never return 0 if we mask our own hold
bit before calling it. however we must be careful to mask before h_TossStuff_r
so we aren't still "holding" then
otherwise just release our hold
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
mask holdbit in case i missed
register struct host *host;
{
- if (!((host)->holds[h_holdSlot()] &= ~h_holdbit()) ) {
+ if (!((host)->holds[h_holdSlot()] & ~h_holdbit()) ) {
if (! h_OtherHolds_r(host) ) {
+ /* must avoid masking this until after h_OtherHolds_r runs
+ but it should be run before h_TossStuff_r */
+ (host)->holds[h_holdSlot()] &= ~h_holdbit();
if ( (host->hostFlags & HOSTDELETED) ||
(host->hostFlags & CLIENTDELETED) ) {
h_TossStuff_r(host);
}
- }
- }
+ } else
+ (host)->holds[h_holdSlot()] &= ~h_holdbit();
+ } else
+ (host)->holds[h_holdSlot()] &= ~h_holdbit();
+
return 0;
}