summarylogtreecommitdiffstats
path: root/ldadd_swp.c
blob: d664837d0d8d7fb57b70396a3591b0d87f9e45b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdint.h>

__attribute__((target("no-outline-atomics")))
int32_t __aarch64_ldadd4_acq_rel(int32_t value, int32_t *ptr)
{
    return __atomic_fetch_add(ptr, value, __ATOMIC_ACQ_REL);
}

__attribute__((target("no-outline-atomics")))
int32_t __aarch64_swp4_acq_rel(int32_t value, int32_t *ptr)
{
    return __atomic_exchange_n(ptr, value, __ATOMIC_ACQ_REL);
}