void (ShieldLeave)(Arena arena) { AVERT(Arena, arena); AVER(arena->insideShield); ShieldFlush(arena); /* Cache is empty so inv.outside.depth holds */ AVER(arena->shDepth == 0); /* Ensuring the mutator is running at this point * guarantees inv.outside.running */ if (arena->suspended) { ThreadRingResume(ArenaThreadRing(arena)); arena->suspended = FALSE; } arena->insideShield = FALSE; }
void (ShieldLeave)(Arena arena) { Shield shield; AVERT(Arena, arena); shield = ArenaShield(arena); AVER(shield->inside); AVER(shield->depth == 0); /* no pending covers */ AVER(shield->holds == 0); ShieldFlush(arena); AVER(shield->unsynced == 0); /* everything back in sync */ /* Ensuring the mutator is running at this point guarantees .inv.outside.running */ if (shield->suspended) { ThreadRingResume(ArenaThreadRing(arena), ArenaDeadRing(arena)); shield->suspended = FALSE; } shield->inside = FALSE; }