libclod
C library for interacting with NBTs, region files, LOD data and other things.
Loading...
Searching...
No Matches
yield.h
1#ifndef LIBCLOD_YIELD_H
2#define LIBCLOD_YIELD_H
3
4#include "clod_thread_config.h"
5
6#if CLOD_HAVE_SCHED_YIELD
7 #include <sched.h>
8 #define clod_yield sched_yield
9#else
10 #error "Yield not implemented on this platform"
11#endif
12
13#if CLOD_HAVE_X86_64
14 #include <immintrin.h>
15 #define clod_pause _mm_pause
16#elif CLOD_HAVE_ARM64
17 #include <arm_acle.h>
18 #define clod_pause __yield()
19#elif
20 #error "Pause instruction not implemented on this architecture"
21#endif
22
23#endif