__atomic2::atomic_bool(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

πŸ’– NAME πŸ’–

__atomic2::atomic_bool β€” literally just atomic_bool, bestie. That's the whole name. Short, iconic, to the point. ✨

Oh and real quick, the manual name is Library Functions Manual β€” so you know this is the library-functions girlies' territory, not some random section 1 command situation. πŸŽ€


🌸 SYNOPSIS 🌸

✨ Public Member Functions ✨

okay so here's the whole squad of public member functions, and yes you need every single one of them, no skipping πŸ™ˆ

  • atomic_bool (bool __i) β€” the constructor that takes a bool __i and starts your atomic off with it 🫢
  • atomic_bool (const atomic_bool &) β€” the copy constructor, for when you need a twin πŸ’…
  • bool compare_exchange_strong (bool &__i1, bool __i2, memory_order __m=memory_order_seq_cst) volatile β€” the strong version, with __m defaulting to memory_order_seq_cst, and yeah it's volatile, we don't make the rules πŸ”₯
  • bool compare_exchange_strong (bool &__i1, bool __i2, memory_order __m1, memory_order __m2) volatile β€” strong version again but with two memory orders, __m1 and __m2, for the overachievers πŸ‘‘
  • bool compare_exchange_weak (bool &__i1, bool __i2, memory_order __m=memory_order_seq_cst) volatile β€” the weak one, __m still chillin' at memory_order_seq_cst by default 🌈
  • bool compare_exchange_weak (bool &__i1, bool __i2, memory_order __m1, memory_order __m2) volatile β€” weak + two memory orders (__m1, __m2). she contains multitudes ⭐
  • bool exchange (bool __i, memory_order __m=memory_order_seq_cst) volatile β€” swaps in __i, __m defaults to memory_order_seq_cst, still volatile bestie πŸ’€
  • bool is_lock_free () const volatile β€” asks the question we all ask ourselves: is it lock free? const volatile, naturally πŸ¦‹
  • bool load (memory_order __m=memory_order_seq_cst) const volatile β€” reads the value, __m defaults to memory_order_seq_cst, and yes: const volatile πŸ’œ
  • operator bool () const volatile β€” the conversion operator, so your atomic can just be a bool when the moment calls for it. main character energy 🧚
  • bool operator= (bool __i) β€” assignment from a plain bool __i 😌
  • atomic_bool & operator= (const atomic_bool &) β€” assignment from another atomic_bool, returns a reference to the atomic_bool because chaining is slay ✨
  • void store (bool __i, memory_order __m=memory_order_seq_cst) volatile β€” writes __i in there, __m defaults to memory_order_seq_cst, volatile as always πŸ’–

πŸŽ€ Detailed Description πŸŽ€

It does atomic_bool. That's it. That's the description. ngl sometimes the vibes speak for themselves πŸ™ˆ

Definition at line 388 of file atomic_2.h. β€” write it down, this is the receipts, don't come for me if you forget πŸ”₯

🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code. So like… nobody wrote this with their hands, the machine did it, and honestly? it ate πŸ’…


and that's the whole page bestie!! 🫢 this beauty is from libstdc++, dated 21 Apr 2009 β€” vintage, lowkey iconic, periodt. πŸŒˆπŸ’–

πŸ“¦ where this page comes from