/*
 * Copyright (C) Huawei Technologies Co., Ltd. 2023-2024. All rights reserved.
 * SPDX-License-Identifier: MIT
 */

#ifndef VATOMIC_CONFIG_PTR_RLX_H
#define VATOMIC_CONFIG_PTR_RLX_H
/* !!!Warning: File generated by tmplr; DO NOT EDIT.!!! */

#include <vsync/atomic/await.h>

#if defined(VATOMIC_ENABLE_ATOMIC_RLX)

    #define VATOMICPTR_READ
static inline void *
vatomicptr_read(const vatomicptr_t *a)
{
    return vatomicptr_read_rlx(a);
}
    #define VATOMICPTR_READ_ACQ
static inline void *
vatomicptr_read_acq(const vatomicptr_t *a)
{
    return vatomicptr_read_rlx(a);
}

    #define VATOMICPTR_WRITE
static inline void
vatomicptr_write(vatomicptr_t *a, void *v)
{
    vatomicptr_write_rlx(a, v);
}
    #define VATOMICPTR_WRITE_REL
static inline void
vatomicptr_write_rel(vatomicptr_t *a, void *v)
{
    vatomicptr_write_rlx(a, v);
}

    #define VATOMICPTR_XCHG
static inline void *
vatomicptr_xchg(vatomicptr_t *a, void *v)
{
    return vatomicptr_xchg_rlx(a, v);
}
    #define VATOMICPTR_XCHG_ACQ
static inline void *
vatomicptr_xchg_acq(vatomicptr_t *a, void *v)
{
    return vatomicptr_xchg_rlx(a, v);
}
    #define VATOMICPTR_XCHG_REL
static inline void *
vatomicptr_xchg_rel(vatomicptr_t *a, void *v)
{
    return vatomicptr_xchg_rlx(a, v);
}

    #define VATOMICPTR_CMPXCHG
static inline void *
vatomicptr_cmpxchg(vatomicptr_t *a, void *e, void *v)
{
    return vatomicptr_cmpxchg_rlx(a, e, v);
}
    #define VATOMICPTR_CMPXCHG_ACQ
static inline void *
vatomicptr_cmpxchg_acq(vatomicptr_t *a, void *e, void *v)
{
    return vatomicptr_cmpxchg_rlx(a, e, v);
}
    #define VATOMICPTR_CMPXCHG_REL
static inline void *
vatomicptr_cmpxchg_rel(vatomicptr_t *a, void *e, void *v)
{
    return vatomicptr_cmpxchg_rlx(a, e, v);
}

    #define VATOMICPTR_AWAIT_EQ
static inline void *
vatomicptr_await_eq(const vatomicptr_t *a, void *v)
{
    return vatomicptr_await_eq_rlx(a, v);
}
    #define VATOMICPTR_AWAIT_NEQ
static inline void *
vatomicptr_await_neq(const vatomicptr_t *a, void *v)
{
    return vatomicptr_await_neq_rlx(a, v);
}
    #define VATOMICPTR_AWAIT_EQ_ACQ
static inline void *
vatomicptr_await_eq_acq(const vatomicptr_t *a, void *v)
{
    return vatomicptr_await_eq_rlx(a, v);
}
    #define VATOMICPTR_AWAIT_NEQ_ACQ
static inline void *
vatomicptr_await_neq_acq(const vatomicptr_t *a, void *v)
{
    return vatomicptr_await_neq_rlx(a, v);
}

    #define VATOMICPTR_AWAIT_NEQ_SET
static inline void *
vatomicptr_await_neq_set(vatomicptr_t *a, void *c, void *v)
{
    return vatomicptr_await_neq_set_rlx(a, c, v);
}
    #define VATOMICPTR_AWAIT_NEQ_SET_ACQ
static inline void *
vatomicptr_await_neq_set_acq(vatomicptr_t *a, void *c, void *v)
{
    return vatomicptr_await_neq_set_rlx(a, c, v);
}
    #define VATOMICPTR_AWAIT_NEQ_SET_REL
static inline void *
vatomicptr_await_neq_set_rel(vatomicptr_t *a, void *c, void *v)
{
    return vatomicptr_await_neq_set_rlx(a, c, v);
}

    #define VATOMICPTR_AWAIT_EQ_SET
static inline void *
vatomicptr_await_eq_set(vatomicptr_t *a, void *c, void *v)
{
    return vatomicptr_await_eq_set_rlx(a, c, v);
}
    #define VATOMICPTR_AWAIT_EQ_SET_ACQ
static inline void *
vatomicptr_await_eq_set_acq(vatomicptr_t *a, void *c, void *v)
{
    return vatomicptr_await_eq_set_rlx(a, c, v);
}
    #define VATOMICPTR_AWAIT_EQ_SET_REL
static inline void *
vatomicptr_await_eq_set_rel(vatomicptr_t *a, void *c, void *v)
{
    return vatomicptr_await_eq_set_rlx(a, c, v);
}

#endif
#endif
