Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
atomic_arch.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Demant A/S
3 * Copyright (c) 2023 Nordic Semiconductor ASA
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef ZEPHYR_INCLUDE_SYS_ATOMIC_ARCH_H_
9#define ZEPHYR_INCLUDE_SYS_ATOMIC_ARCH_H_
10
11#include <stdbool.h>
13
14/* Included from <atomic.h> */
15
16/* Arch specific atomic primitives */
17
18bool atomic_cas(atomic_t *target, atomic_val_t old_value,
19 atomic_val_t new_value);
20
21bool atomic_ptr_cas(atomic_ptr_t *target, void *old_value,
22 void *new_value);
23
25
27
29
31
33
34void *atomic_ptr_get(const atomic_ptr_t *target);
35
37
38void *atomic_ptr_set(atomic_ptr_t *target, void *value);
39
41
43
45
47
49
51
52
53#endif /* ZEPHYR_INCLUDE_SYS_ATOMIC_ARCH_H_ */
void * atomic_ptr_get(const atomic_ptr_t *target)
atomic_val_t atomic_or(atomic_t *target, atomic_val_t value)
atomic_val_t atomic_xor(atomic_t *target, atomic_val_t value)
atomic_val_t atomic_get(const atomic_t *target)
atomic_val_t atomic_nand(atomic_t *target, atomic_val_t value)
atomic_val_t atomic_and(atomic_t *target, atomic_val_t value)
atomic_val_t atomic_add(atomic_t *target, atomic_val_t value)
atomic_val_t atomic_set(atomic_t *target, atomic_val_t value)
void * atomic_ptr_clear(atomic_ptr_t *target)
atomic_val_t atomic_sub(atomic_t *target, atomic_val_t value)
atomic_val_t atomic_clear(atomic_t *target)
void * atomic_ptr_set(atomic_ptr_t *target, void *value)
atomic_val_t atomic_inc(atomic_t *target)
bool atomic_cas(atomic_t *target, atomic_val_t old_value, atomic_val_t new_value)
atomic_val_t atomic_dec(atomic_t *target)
bool atomic_ptr_cas(atomic_ptr_t *target, void *old_value, void *new_value)
long atomic_t
Definition atomic_types.h:15
atomic_t atomic_val_t
Definition atomic_types.h:16
void * atomic_ptr_t
Definition atomic_types.h:17