Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
atomic_arch.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Demant A/S
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_SYS_ATOMIC_ARCH_H_
8#define ZEPHYR_INCLUDE_SYS_ATOMIC_ARCH_H_
9
10/* Included from <atomic.h> */
11
12/* Arch specific atomic primitives */
13
14extern bool atomic_cas(atomic_t *target, atomic_val_t old_value,
15 atomic_val_t new_value);
16
17extern bool atomic_ptr_cas(atomic_ptr_t *target, void *old_value,
18 void *new_value);
19
21
23
25
27
29
30extern void *atomic_ptr_get(const atomic_ptr_t *target);
31
33
34extern void *atomic_ptr_set(atomic_ptr_t *target, void *value);
35
37
39
41
43
45
47
48
49#endif /* ZEPHYR_INCLUDE_SYS_ATOMIC_ARCH_H_ */
atomic_t atomic_val_t
Definition: atomic.h:22
void * atomic_ptr_t
Definition: atomic.h:23
int atomic_t
Definition: atomic.h:21
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)
int target
Definition: main.c:68