5 #ifndef INCLUDE_CPPGC_INTERNAL_ATOMIC_ENTRY_FLAG_H_
6 #define INCLUDE_CPPGC_INTERNAL_ATOMIC_ENTRY_FLAG_H_
29 class AtomicEntryFlag
final {
31 void Enter() { entries_.fetch_add(1, std::memory_order_relaxed); }
32 void Exit() { entries_.fetch_sub(1, std::memory_order_relaxed); }
38 return entries_.load(std::memory_order_relaxed) != 0;
42 std::atomic_int entries_{0};