Ignore:
Timestamp:
2023-10-22T17:55:33Z (14 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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.
Message:

Merge branch 'master' into ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/arm32/src/atomic.c

    r315d487 r1c6c3e1d  
    3838volatile unsigned *ras_page;
    3939
    40 bool __atomic_compare_exchange_4(volatile void *mem, void *expected, unsigned desired, bool weak, int success, int failure)
     40bool __atomic_compare_exchange_4(volatile void *mem0, void *expected0,
     41    unsigned desired, bool weak, int success, int failure)
    4142{
     43        volatile unsigned *mem = mem0;
     44        unsigned *expected = expected0;
     45
    4246        (void) success;
    4347        (void) failure;
    4448        (void) weak;
    4549
    46         unsigned ov = *((unsigned *)expected);
     50        unsigned ov = *expected;
    4751        unsigned ret;
    4852
     
    6670              [rp0] "=m" (ras_page[0]),
    6771              [rp1] "=m" (ras_page[1]),
    68               [addr] "+m" (*((unsigned *)mem))
     72              [addr] "+m" (*mem)
    6973            : [ov] "r" (ov),
    7074              [nv] "r" (desired)
     
    7882                return true;
    7983
    80         *((unsigned *)expected) = ret;
     84        *expected = ret;
    8185        return false;
    8286}
    8387
    84 unsigned short __atomic_fetch_add_2(volatile void *mem, unsigned short val, int model)
     88unsigned short __atomic_fetch_add_2(volatile void *mem0, unsigned short val,
     89    int model)
    8590{
     91        volatile unsigned short *mem = mem0;
     92
    8693        (void) model;
    8794
     
    106113              [rp0] "=m" (ras_page[0]),
    107114              [rp1] "=m" (ras_page[1]),
    108               [addr] "+m" (*((volatile unsigned short *)mem))
     115              [addr] "+m" (*mem)
    109116            : [imm] "r" (val)
    110117        );
     
    116123}
    117124
    118 unsigned __atomic_fetch_add_4(volatile void *mem, unsigned val, int model)
     125unsigned __atomic_fetch_add_4(volatile void *mem0, unsigned val, int model)
    119126{
     127        volatile unsigned *mem = mem0;
     128
    120129        (void) model;
    121130
     
    140149              [rp0] "=m" (ras_page[0]),
    141150              [rp1] "=m" (ras_page[1]),
    142               [addr] "+m" (*((volatile unsigned *)mem))
     151              [addr] "+m" (*mem)
    143152            : [imm] "r" (val)
    144153        );
Note: See TracChangeset for help on using the changeset viewer.