@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
stdatomic.h
Go to the documentation of this file.
/*
* Copyright (c) 2024 Raspberry Pi (Trading) Ltd.
* Copyright (c) 2024 Stephen Street (stephen@redrocketcomputing.com).
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __STDATOMIC_H
#define __STDATOMIC_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include_next <stdatomic.h>
// needed for PICO_C_COMPILER_IS_GNU
#include "pico.h"
#if PICO_RP2040 && PICO_C_COMPILER_IS_GNU
// on GNU without exclusive instructions these don't get routed thru _1 functions for some reason
#undef atomic_flag_test_and_set
#undef atomic_flag_test_and_set_explicit
extern _Bool __atomic_test_and_set_c(volatile void *mem, int model);
#define atomic_flag_test_and_set(PTR) __atomic_test_and_set_c((PTR), __ATOMIC_SEQ_CST)
#define atomic_flag_test_and_set_explicit(PTR, MO) __atomic_test_and_set_c((PTR), (MO))
#endif
#ifdef __cplusplus
}
#endif
#endif
pico.h