Changeset 1c6c3e1d in mainline for uspace/lib/c/arch/arm32/src/atomic.c
- Timestamp:
- 2023-10-22T17:55:33Z (14 months ago)
- Branches:
- ticket/834-toolchain-update
- Children:
- 350ec74
- Parents:
- 315d487 (diff), 133461c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/arm32/src/atomic.c
r315d487 r1c6c3e1d 38 38 volatile unsigned *ras_page; 39 39 40 bool __atomic_compare_exchange_4(volatile void *mem, void *expected, unsigned desired, bool weak, int success, int failure) 40 bool __atomic_compare_exchange_4(volatile void *mem0, void *expected0, 41 unsigned desired, bool weak, int success, int failure) 41 42 { 43 volatile unsigned *mem = mem0; 44 unsigned *expected = expected0; 45 42 46 (void) success; 43 47 (void) failure; 44 48 (void) weak; 45 49 46 unsigned ov = * ((unsigned *)expected);50 unsigned ov = *expected; 47 51 unsigned ret; 48 52 … … 66 70 [rp0] "=m" (ras_page[0]), 67 71 [rp1] "=m" (ras_page[1]), 68 [addr] "+m" (* ((unsigned *)mem))72 [addr] "+m" (*mem) 69 73 : [ov] "r" (ov), 70 74 [nv] "r" (desired) … … 78 82 return true; 79 83 80 * ((unsigned *)expected)= ret;84 *expected = ret; 81 85 return false; 82 86 } 83 87 84 unsigned short __atomic_fetch_add_2(volatile void *mem, unsigned short val, int model) 88 unsigned short __atomic_fetch_add_2(volatile void *mem0, unsigned short val, 89 int model) 85 90 { 91 volatile unsigned short *mem = mem0; 92 86 93 (void) model; 87 94 … … 106 113 [rp0] "=m" (ras_page[0]), 107 114 [rp1] "=m" (ras_page[1]), 108 [addr] "+m" (* ((volatile unsigned short *)mem))115 [addr] "+m" (*mem) 109 116 : [imm] "r" (val) 110 117 ); … … 116 123 } 117 124 118 unsigned __atomic_fetch_add_4(volatile void *mem , unsigned val, int model)125 unsigned __atomic_fetch_add_4(volatile void *mem0, unsigned val, int model) 119 126 { 127 volatile unsigned *mem = mem0; 128 120 129 (void) model; 121 130 … … 140 149 [rp0] "=m" (ras_page[0]), 141 150 [rp1] "=m" (ras_page[1]), 142 [addr] "+m" (* ((volatile unsigned *)mem))151 [addr] "+m" (*mem) 143 152 : [imm] "r" (val) 144 153 );
Note:
See TracChangeset
for help on using the changeset viewer.