mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 09:33:50 +01:00
Atomic built-in function __atomic_test_and_set seem to be missing in GCC 14.2.0 for some ESP32x SoCs.
27 lines
550 B
C
27 lines
550 B
C
/*
|
|
* Copyright (C) 2025 Gunar Schorcht
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
* directory for more details.
|
|
*/
|
|
|
|
/**
|
|
* @ingroup cpu_esp_common
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Missing atomic built-in functions
|
|
*
|
|
* @author Gunar Schorcht <gunar@schorcht.net>
|
|
* @}
|
|
*/
|
|
|
|
#include <stdbool.h>
|
|
|
|
__attribute__((weak))
|
|
bool __atomic_test_and_set(volatile void *ptr, int memorder)
|
|
{
|
|
return __atomic_exchange_1(ptr, true, memorder);
|
|
}
|