QB_ATOMIC_INT_SET(3)

πŸ’… QB_ATOMIC_INT_SET ✨

okay bestie, so this is a page from the libqb Programmer's Manual, section 3 (that's the library-functions girlies, iykyk). Today's main character: qb_atomic_int_set πŸŽ€


🌸 NAME 🌸

qb_atomic_int_set β€” sets the value of the integer pointed to by atomic. literally that's it, that's the whole job, and she does it flawlessly πŸ’–


✨ SYNOPSIS ✨

#include <qb/qbatomic.h>

void qb_atomic_int_set(
    volatile int32_t QB_GNUC_MAY_ALIAS   *atomic,  /* a pointer to an integer */
    int32_t                               newval   /* the new value */
);

no cap, that's the whole signature. two lil arguments, zero drama πŸ¦‹


🫢 PARAMS 🫢

  • atomic β€” a pointer to an integer. that's the lil guy getting a glow-up ✨
  • newval β€” the new value. this is what she's becoming πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

She sets the value of the integer that atomic points at. simple. iconic. slay.

AND β€” and this is the part you need to remember bestie, don't skip it β€” she also acts as a memory barrier. the way that she's not just a setter, she's out here enforcing ordering too πŸ”₯ not me being obsessed with a function that does two things at once πŸ’…


🌈 SEE ALSO 🌈

the whole friend group, fr fr:


Copyright (C) 2003 Sebastian Wilhelmi


okay that's the whole page, mwah πŸ’‹ this came out of LIBQB, dated 2025-09-16, and it's QB_ATOMIC_INT_SET in section 3 β€” go forth and set your atomics, bestie, you got this πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from