std::atomic_flag(3cxx)

okay so bestie, welcome to the std::atomic_flag(3cxx) page from libstdc++ πŸ’… this is the manual page for std::atomic_flag, and we are keeping every single receipt. no cap.

πŸ’– NAME πŸ’–

std::atomic_flag - atomic_flag

✨ SYNOPSIS ✨

#include <atomic>

Inherits __atomic_flag_base.

πŸŽ€ Public Member Functions πŸŽ€

  • constexpr atomic_flag (bool __i) noexcept β€” the constructor, and yes it takes a bool __i and is constexpr + noexcept 🫢
  • atomic_flag (const atomic_flag &)=delete β€” copy constructor is =delete, so do not try to copy this icon πŸ’€
  • void clear (memory_order __m=memory_order_seq_cst) noexcept β€” the non-volatile clear, with __m defaulting to memory_order_seq_cst ✨
  • void clear (memory_order __m=memory_order_seq_cst) volatile noexcept β€” the volatile clear overload, same default memory_order_seq_cst energy 🌸
  • void notify_all () noexcept β€” notify_all, noexcept, periodt πŸ’…
  • void notify_one () noexcept β€” notify_one, also noexcept, we love consistency πŸŽ€
  • atomic_flag & operator= (const atomic_flag &) volatile=delete β€” deleted volatile assignment operator, not me forgetting this one πŸ™ˆ
  • atomic_flag & operator= (const atomic_flag &)=delete β€” deleted assignment operator, no copying or assigning, bestie 🚫
  • bool test (memory_order __m=memory_order_seq_cst) const noexcept β€” the const test, __m defaults to memory_order_seq_cst, and it is noexcept πŸ”₯
  • bool test (memory_order __m=memory_order_seq_cst) const volatile noexcept β€” the const volatile test overload, same default __m, still noexcept 🌈
  • bool test_and_set (memory_order __m=memory_order_seq_cst) noexcept β€” the plain test_and_set, with __m defaulting to memory_order_seq_cst ⭐
  • bool test_and_set (memory_order __m=memory_order_seq_cst) volatile noexcept β€” the volatile test_and_set overload, same default __m, same noexcept vibe πŸ’œ
  • void wait (bool __old, memory_order __m=memory_order_seq_cst) const noexcept β€” wait takes bool __old, __m defaults to memory_order_seq_cst, and it is const noexcept πŸ¦‹
🚨 quick vibe check: both operator= overloads and the copy constructor are =delete. that is literally in the signatures, so no sneaky copying/assigning.

🌟 Detailed Description 🌟

atomic_flag

that’s it. that’s the detailed description. iconic minimalism, honestly πŸ‘‘

πŸ’Œ Author πŸ’Œ

Author: Generated automatically by Doxygen for libstdc++ from the source code.


xoxo, your libstdc++ bestie πŸ’– source/version: libstdc++; page: std::atomic_flag(3cxx). the footer does not print a date, so i’m not inventing one β€” periodt πŸ’…

πŸ“¦ where this page comes from