#include "lib/types.h"
#include "lib/assert.h"
Go to the source code of this file.
◆ __MOTR_LIB_USER_AARCH64_ATOMIC_H__
#define __MOTR_LIB_USER_AARCH64_ATOMIC_H__ |
◆ m0_atomic64_add()
static void m0_atomic64_add |
( |
struct m0_atomic64 * |
a, |
|
|
int64_t |
num |
|
) |
| |
|
inlinestatic |
◆ m0_atomic64_add_return()
static int64_t m0_atomic64_add_return |
( |
struct m0_atomic64 * |
a, |
|
|
int64_t |
delta |
|
) |
| |
|
inlinestatic |
atomically increment counter and return result
- Parameters
-
a | pointer to atomic counter |
- Returns
- new value of atomic counter
Definition at line 129 of file user_aarch64_atomic.h.
◆ m0_atomic64_cas()
static bool m0_atomic64_cas |
( |
int64_t * |
loc, |
|
|
int64_t |
oldval, |
|
|
int64_t |
newval |
|
) |
| |
|
inlinestatic |
Since the undersigend commented code being processor specific assembly instruction, This would act more comprehensible while porting to other platform. Since this code has few flaws, not debugged yet.It is not working as of now. The gcc specific routine is called in place of it which has no public source code available. So it is kept as part of documentation for future reference and implementation.
Definition at line 184 of file user_aarch64_atomic.h.
◆ m0_atomic64_dec()
atomically decrement counter
- Parameters
-
a | pointer to atomic counter |
- Returns
- none
Definition at line 81 of file user_aarch64_atomic.h.
◆ m0_atomic64_dec_and_test()
static bool m0_atomic64_dec_and_test |
( |
struct m0_atomic64 * |
a | ) |
|
|
inlinestatic |
◆ m0_atomic64_get()
static int64_t m0_atomic64_get |
( |
const struct m0_atomic64 * |
a | ) |
|
|
inlinestatic |
◆ m0_atomic64_inc()
atomically increment counter
- Parameters
-
a | pointer to atomic counter |
- Returns
- none
Definition at line 69 of file user_aarch64_atomic.h.
◆ m0_atomic64_inc_and_test()
static bool m0_atomic64_inc_and_test |
( |
struct m0_atomic64 * |
a | ) |
|
|
inlinestatic |
◆ m0_atomic64_set()
static void m0_atomic64_set |
( |
struct m0_atomic64 * |
a, |
|
|
int64_t |
num |
|
) |
| |
|
inlinestatic |
◆ m0_atomic64_sub()
static void m0_atomic64_sub |
( |
struct m0_atomic64 * |
a, |
|
|
int64_t |
num |
|
) |
| |
|
inlinestatic |
◆ m0_atomic64_sub_return()
static int64_t m0_atomic64_sub_return |
( |
struct m0_atomic64 * |
a, |
|
|
int64_t |
delta |
|
) |
| |
|
inlinestatic |
atomically decrement counter and return result
- Parameters
-
a | pointer to atomic counter |
- Returns
- new value of atomic counter
Definition at line 155 of file user_aarch64_atomic.h.
◆ m0_mb()
static void m0_mb |
( |
void |
| ) |
|
|
inlinestatic |