17#ifndef SEQAN3_HAS_MM_PAUSE
18# if defined(__SSE2__) && __has_include(<xmmintrin.h>)
19# include <xmmintrin.h>
20# define SEQAN3_HAS_MM_PAUSE 1
22# define SEQAN3_HAS_MM_PAUSE 0
66 for (int_fast32_t i = 0; i <
current; ++i)
80#if SEQAN3_HAS_MM_PAUSE
82#elif defined(__armel__) || defined(__ARMEL__)
83 asm volatile(
"nop" :::
"memory");
84#elif defined(__arm__) || defined(__aarch64__)
85 __asm__ __volatile__(
"yield" :::
"memory");
86#elif defined(__ia64__)
87 __asm__ __volatile__(
"hint @pause");
88#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) || defined(__ppc64__)
89# if defined(__APPLE__)
90 __asm__
volatile(
"or r27,r27,r27" :::
"memory");
92 __asm__ __volatile__(
"or 27,27,27" :::
"memory");
95 asm volatile(
"nop" :::
"memory");
A delay for threads waiting for a shared resource.
Definition spin_delay.hpp:41
void pause_processor()
Efficient instruction to pause the CPU.
Definition spin_delay.hpp:78
void wait()
Delays the calling thread by either using active spinning or passive spinning.
Definition spin_delay.hpp:62
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:100
int_fast32_t current
The current waiting phase.
Definition spin_delay.hpp:102
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26