October 2017
Intermediate to advanced
354 pages
9h 28m
English
Generic atomic operation interfaces include support for integer and bitwise operations. Integer operations are implemented to operate on special kernel-defined types called atomic_t (32-bit integer) and atomic64_t (64-bit integer). Definitions for these types can be found in the generic kernel header <linux/types.h>:
typedef struct { int counter;} atomic_t;#ifdef CONFIG_64BITtypedef struct { long counter;} atomic64_t;#endif
The implementation provides two groups of integer operations; one set applicable on 32 bit and the other group for 64 bit atomic variables. These interface operations are implemented as a set of macros and inline functions. Following is a summarized list of operations applicable on atomic_t type ...