Changeset 7c3fb9b in mainline for uspace/lib/c/arch/riscv64/include/libarch/atomic.h
- Timestamp:
- 2018-05-17T08:29:01Z (7 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/riscv64/include/libarch/atomic.h
rfac0ac7 r7c3fb9b 57 57 static inline void atomic_inc(atomic_t *val) 58 58 { 59 /* On real hardware the increment has to be done 60 as an atomic action. */ 59 /* 60 * On real hardware the increment has to be done 61 * as an atomic action. 62 */ 61 63 62 64 val->count++; … … 65 67 static inline void atomic_dec(atomic_t *val) 66 68 { 67 /* On real hardware the decrement has to be done 68 as an atomic action. */ 69 /* 70 * On real hardware the decrement has to be done 71 * as an atomic action. 72 */ 69 73 70 74 val->count++; … … 73 77 static inline atomic_count_t atomic_postinc(atomic_t *val) 74 78 { 75 /* On real hardware both the storing of the previous 76 value and the increment have to be done as a single 77 atomic action. */ 79 /* 80 * On real hardware both the storing of the previous 81 * value and the increment have to be done as a single 82 * atomic action. 83 */ 78 84 79 85 atomic_count_t prev = val->count; … … 85 91 static inline atomic_count_t atomic_postdec(atomic_t *val) 86 92 { 87 /* On real hardware both the storing of the previous 88 value and the decrement have to be done as a single 89 atomic action. */ 93 /* 94 * On real hardware both the storing of the previous 95 * value and the decrement have to be done as a single 96 * atomic action. 97 */ 90 98 91 99 atomic_count_t prev = val->count;
Note:
See TracChangeset
for help on using the changeset viewer.