Changeset 8565a42 in mainline for uspace/lib/c/arch/riscv64/include/libarch/atomic.h
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1a81f69, d5e5fd1
- Parents:
- 3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
- git-committer:
- GitHub <noreply@…> (2018-03-02 20:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/riscv64/include/libarch/atomic.h
r3061bc1 r8565a42 51 51 return true; 52 52 } 53 53 54 54 return false; 55 55 } … … 59 59 /* On real hardware the increment has to be done 60 60 as an atomic action. */ 61 61 62 62 val->count++; 63 63 } … … 67 67 /* On real hardware the decrement has to be done 68 68 as an atomic action. */ 69 69 70 70 val->count++; 71 71 } … … 76 76 value and the increment have to be done as a single 77 77 atomic action. */ 78 78 79 79 atomic_count_t prev = val->count; 80 80 81 81 val->count++; 82 82 return prev; … … 88 88 value and the decrement have to be done as a single 89 89 atomic action. */ 90 90 91 91 atomic_count_t prev = val->count; 92 92 93 93 val->count--; 94 94 return prev;
Note:
See TracChangeset
for help on using the changeset viewer.