18#ifndef SEQAN3_HAS_MM_PAUSE
19# if defined(__SSE2__) && __has_include(<xmmintrin.h>)
20# include <xmmintrin.h>
21# define SEQAN3_HAS_MM_PAUSE 1
67 for (int_fast32_t i = 0; i <
current; ++i)
81#if SEQAN3_HAS_MM_PAUSE
83#elif defined(__armel__) \
85 asm volatile(
"nop" :::
"memory");
86#elif defined(__arm__) || defined(__aarch64__)
87 __asm__ __volatile__(
"yield" :::
"memory");
88#elif defined(__ia64__)
89 __asm__ __volatile__(
"hint @pause");
90#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
91 __asm__ __volatile__(
"or 27,27,27" :::
"memory");
93 asm volatile(
"nop" :::
"memory");
A delay for threads waiting for a shared resource.
Definition: spin_delay.hpp:42
void pause_processor()
Efficient instruction to pause the CPU.
Definition: spin_delay.hpp:79
void wait()
Delays the calling thread by either using active spinning or passive spinning.
Definition: spin_delay.hpp:63
constexpr spin_delay() noexcept=default
Defaulted.
static constexpr int_fast32_t max_repetitions
The maximal number of repetitions until the thread yields.
Definition: spin_delay.hpp:98
int_fast32_t current
The current waiting phase.
Definition: spin_delay.hpp:100
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29