getAndSetFlag

Atomically replace the given flag with the boolean, answering the boolean that previously occupied that flag.