ATOMIC_SETBITS_INT(9)

πŸ“¦ in nixpkgs unstable

πŸ’– ATOMIC_SETBITS_INT(9) πŸ’–

okay so bestie, welcome to the Kernel Developer's Manual page for ATOMIC_SETBITS_INT(9). it’s giving β€œtiny but powerful atomic bit energy,” and we’re gonna go through it together. 🫢✨

🌸 NAME 🌸

  • atomic_setbits_int, atomic_clearbits_int β€” interface to perform atomic operations on data. literally that’s the whole vibe. πŸ’…

✨ SYNOPSIS ✨

#include <sys/atomic.h>

void
atomic_setbits_int(unsigned int *p, unsigned int b);

void
atomic_clearbits_int(unsigned int *p, unsigned int b);

πŸ¦‹ DESCRIPTION πŸ¦‹

The atomic bits set of functions provide an interface for changing data atomically with respect to interrupts and multiple processors in the system. no cap, that’s the whole point. πŸ”₯

atomic_setbits_int() sets the bits in b in the integer pointed to by p. it is equivalent to:

*p |= b;

atomic_clearbits_int() clears the bits in b in the integer pointed to by p. it is equivalent to:

*p &= ~b;

🧚 CONTEXT 🧚

atomic_setbits_int() and atomic_clearbits_int() can be called:

  • during autoconf
  • from process context
  • from interrupt context

so yeah, they’re flexible like that. 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

go check out these besties too:

πŸ’œ HISTORY πŸ’œ

The atomic_setbits_int functions first appeared in OpenBSD 4.1. periodt. ✨


mwah πŸ’‹ this page came from Debian, dated February 13, 2014. bye bestie, go set some bits atomically! πŸŽ€πŸ’–

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms