Changeset a35b458 in mainline for uspace/lib/c/arch/riscv64/include/libarch/atomic.h
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/riscv64/include/libarch/atomic.h
r3061bc1 ra35b458 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.