Changes in kernel/generic/include/atomic.h [7a0359b:df4ed85] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/atomic.h
r7a0359b rdf4ed85 27 27 */ 28 28 29 /** @addtogroup generic 29 /** @addtogroup generic 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ATOMIC_H_ 37 37 38 #include <typedefs.h> 38 typedef struct atomic { 39 volatile long count; 40 } atomic_t; 41 39 42 #include <arch/atomic.h> 40 #include <verify.h>41 43 42 NO_TRACE ATOMIC static inline void atomic_set(atomic_t *val, atomic_count_t i) 43 WRITES(&val->count) 44 REQUIRES_EXTENT_MUTABLE(val) 44 static inline void atomic_set(atomic_t *val, long i) 45 45 { 46 46 val->count = i; 47 47 } 48 48 49 NO_TRACE ATOMIC static inline atomic_count_t atomic_get(atomic_t *val) 50 REQUIRES_EXTENT_MUTABLE(val) 49 static inline long atomic_get(atomic_t *val) 51 50 { 52 51 return val->count;
Note:
See TracChangeset
for help on using the changeset viewer.