Changeset 3767bdb in mainline
- Timestamp:
- 2018-08-03T16:56:31Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e71c023
- Parents:
- c92dfed
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-03 15:56:58)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-03 16:56:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/thread/atomic.c
rc92dfed r3767bdb 72 72 } 73 73 74 unsigned __atomic_fetch_add_4(unsigned *mem, unsigned val, int model) 75 { 76 // TODO 77 (void) model; 78 79 return __sync_add_and_fetch_4(mem, val) - val; 80 } 81 82 unsigned __atomic_fetch_sub_4(unsigned *mem, unsigned val, int model) 83 { 84 // TODO 85 (void) model; 86 87 return __sync_sub_and_fetch_4(mem, val) + val; 88 } 89 90 bool __atomic_compare_exchange_4(unsigned *mem, unsigned *expected, unsigned desired, bool weak, int success, int failure) 91 { 92 // TODO 93 (void) success; 94 (void) failure; 95 (void) weak; 96 97 unsigned old = __sync_val_compare_and_swap_4(mem, *expected, desired); 98 if (old == *expected) 99 return true; 100 101 *expected = old; 102 return false; 103 } 104 74 105 #endif
Note:
See TracChangeset
for help on using the changeset viewer.