ATOMIC_SETBITS_INT(9)
π 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:
atomic_add_int(9)atomic_cas_uint(9)atomic_dec_int(9)atomic_inc_int(9)atomic_sub_int(9)atomic_swap_uint(9)
π 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
- Copyright (c) 2007 Artur Grabowski <art@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms