Changeset 7c3fb9b in mainline for uspace/lib/c/arch/abs32le/include/libarch/atomic.h
- Timestamp:
- 2018-05-17T08:29:01Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ff23ff
- Parents:
- fac0ac7
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/abs32le/include/libarch/atomic.h
rfac0ac7 r7c3fb9b 55 55 static inline void atomic_inc(atomic_t *val) 56 56 { 57 /* On real hardware the increment has to be done 58 as an atomic action. */ 57 /* 58 * On real hardware the increment has to be done 59 * as an atomic action. 60 */ 59 61 60 62 val->count++; … … 63 65 static inline void atomic_dec(atomic_t *val) 64 66 { 65 /* On real hardware the decrement has to be done 66 as an atomic action. */ 67 /* 68 * On real hardware the decrement has to be done 69 * as an atomic action. 70 */ 67 71 68 72 val->count++; … … 71 75 static inline atomic_count_t atomic_postinc(atomic_t *val) 72 76 { 73 /* On real hardware both the storing of the previous 74 value and the increment have to be done as a single 75 atomic action. */ 77 /* 78 * On real hardware both the storing of the previous 79 * value and the increment have to be done as a single 80 * atomic action. 81 */ 76 82 77 83 atomic_count_t prev = val->count; … … 83 89 static inline atomic_count_t atomic_postdec(atomic_t *val) 84 90 { 85 /* On real hardware both the storing of the previous 86 value and the decrement have to be done as a single 87 atomic action. */ 91 /* 92 * On real hardware both the storing of the previous 93 * value and the decrement have to be done as a single 94 * atomic action. 95 */ 88 96 89 97 atomic_count_t prev = val->count;
Note:
See TracChangeset
for help on using the changeset viewer.