October 2017
Intermediate to advanced
354 pages
9h 28m
English
Kernel-provided generic atomic operation interfaces also include bitwise operations. Unlike integer operations, which are implemented to operate on the atomic(64)_t type, these bit operations can be applied on any memory location. The arguments to these operations are the position of the bit or bit number, and a pointer with a valid address. The bit range is 0-31 for 32-bit machines and 0-63 for 64-bit machines. Following is a summarized list of bitwise operations available:
| Operation interface | Description |
| set_bit(int nr, volatile unsigned long *addr) | Atomically set the bit nr in location starting from addr |
| clear_bit(int nr, volatile unsigned long *addr) | Atomically clear the bit nr in location starting from ... |