|
📨 chic 0.0.0
Realtime-safe channels in C
|
Target-dependent wait hints. More...
#include <stddef.h>#include <stdatomic.h>Go to the source code of this file.
Functions | |
| void | chic_yield (void) |
| Yields the current thread execution, allowing other threads to run. | |
| static void | busy_wait_hint (void) |
| Platform-dependent hint to the processor that it is in a busy-wait loop. | |
| static void | busy_wait_on (const void *addr) |
Variables | |
| atomic_size_t | chic_catastrophe_threshold |
| Maximum number of permitted busy-wait loop iterations per send/recieve operation before the thread is yielded. Set to 1024 by default, but this can be overridden at runtime. | |
Target-dependent wait hints.
|
inlinestatic |
Platform-dependent hint to the processor that it is in a busy-wait loop.
This helps optimize spinlocks by slowing down the processor a bit, which helps reduce contention on atomics.
|
inlinestatic |
|
extern |
Maximum number of permitted busy-wait loop iterations per send/recieve operation before the thread is yielded. Set to 1024 by default, but this can be overridden at runtime.