31 lines
406 B
C++
Executable File
31 lines
406 B
C++
Executable File
// License: Modified MIT (NON-AI)
|
|
// See the LICENSE file in the root directory for license information.
|
|
// Copyright 2025 Timothy Prepscius
|
|
|
|
#pragma once
|
|
|
|
#if defined(__aarch64__)
|
|
|
|
#elif defined(__x86_64__)
|
|
#include <immintrin.h>
|
|
#else
|
|
|
|
#endif
|
|
|
|
|
|
namespace tjp::core {
|
|
|
|
inline
|
|
void micropause()
|
|
{
|
|
#if defined(__aarch64__)
|
|
__builtin_arm_yield();
|
|
#elif defined(__x86_64__)
|
|
_mm_pause();
|
|
#else
|
|
|
|
#endif
|
|
}
|
|
|
|
}
|