67#if defined(PLATFORM_ARDUINO)
69#elif defined(PLATFORM_ZEPHYR)
71#elif defined(PLATFORM_NRF52)
73#elif defined(PLATFORM_RP2040)
75#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
87#elif defined(_POSIX_VERSION)
90#elif defined(__riscv) || defined(__riscv__)
92 #error "RISC-V not supported"
94#error "Platform not supported"
102#if defined (LF_SINGLE_THREADED)
109 int lf_disable_interrupts_nested();
115 int lf_enable_interrupts_nested();
122 int _lf_single_threaded_notify_of_event();
219#if defined(PLATFORM_ZEPHYR)
220#define lf_atomic_fetch_add(ptr, value) _zephyr_atomic_fetch_add((int*) ptr, value)
221#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
223#define lf_atomic_fetch_add(ptr, value) InterlockedExchangeAdd(ptr, value)
224#elif defined(__GNUC__) || defined(__clang__)
225#define lf_atomic_fetch_add(ptr, value) __sync_fetch_and_add(ptr, value)
227#error "Compiler not supported"
236#if defined(PLATFORM_ZEPHYR)
237#define lf_atomic_add_fetch(ptr, value) _zephyr_atomic_add_fetch((int*) ptr, value)
238#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
240#define lf_atomic_add_fetch(ptr, value) InterlockedAdd(ptr, value)
241#elif defined(__GNUC__) || defined(__clang__)
242#define lf_atomic_add_fetch(ptr, value) __sync_add_and_fetch(ptr, value)
244#error "Compiler not supported"
255#if defined(PLATFORM_ZEPHYR)
256#define lf_bool_compare_and_swap(ptr, value, newval) _zephyr_bool_compare_and_swap((bool*) ptr, value, newval)
257#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
259#define lf_bool_compare_and_swap(ptr, oldval, newval) (InterlockedCompareExchange(ptr, newval, oldval) == oldval)
260#elif defined(__GNUC__) || defined(__clang__)
261#define lf_bool_compare_and_swap(ptr, oldval, newval) __sync_bool_compare_and_swap(ptr, oldval, newval)
263#error "Compiler not supported"
274#if defined(PLATFORM_ZEPHYR)
275#define lf_val_compare_and_swap(ptr, value, newval) _zephyr_val_compare_and_swap((int*) ptr, value, newval)
276#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
277#define lf_val_compare_and_swap(ptr, oldval, newval) InterlockedCompareExchange(ptr, newval, oldval)
278#elif defined(__GNUC__) || defined(__clang__)
279#define lf_val_compare_and_swap(ptr, oldval, newval) __sync_val_compare_and_swap(ptr, oldval, newval)
281#error "Compiler not supported"
323 #define DEPRECATED(X) X __attribute__((deprecated))
324#elif defined(_MSC_VER)
325 #define DEPRECATED(X) __declspec(deprecated) X
327 #define DEPRECATED(X) X
void * lf_thread_t
Definition lf_arduino_support.h:120
void * lf_mutex_t
Definition lf_arduino_support.h:118
Execution environment. This struct contains information about the execution environment....
Definition environment.h:68
lf_mutex_t mutex
Definition environment.h:99
Definition lf_C11_threads_support.h:38
Time and tag definitions and functions for Lingua Franca.
int64_t instant_t
Definition tag.h:58
int64_t interval_t
Definition tag.h:63