#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 | 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 | 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 | 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 | 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 | arnaldo carvalho de melo | 114 | 100.00% | 1 | 100.00% |
Total | 114 | 100.00% | 1 | 100.00% |