#ifndef __TOOLS_ASM_GENERIC_ATOMIC_H #define __TOOLS_ASM_GENERIC_ATOMIC_H #include <linux/compiler.h> #include <linux/types.h> /* * Atomic operations that C can't guarantee us. Useful for * resource counting etc.. * * Excerpts obtained from the Linux kernel sources. */ #define ATOMIC_INIT(i) { (i) } /** * atomic_read - read atomic variable * @v: pointer of type atomic_t * * Atomically reads the value of @v. */
static inline int atomic_read(const atomic_t *v) { return ACCESS_ONCE((v)->counter); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Arnaldo Carvalho de Melo | 22 | 100.00% | 1 | 100.00% |
Total | 22 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Arnaldo Carvalho de Melo | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Arnaldo Carvalho de Melo | 21 | 100.00% | 1 | 100.00% |
Total | 21 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Arnaldo Carvalho de Melo | 24 | 100.00% | 1 | 100.00% |
Total | 24 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Arnaldo Carvalho de Melo | 114 | 100.00% | 1 | 100.00% |
Total | 114 | 100.00% | 1 | 100.00% |