18 #ifndef FOEDUS_ASSORTED_SPIN_UNTIL_IMPL_HPP_
19 #define FOEDUS_ASSORTED_SPIN_UNTIL_IMPL_HPP_
60 template <
typename COND>
65 while (!spin_until_cond()) {
91 #endif // FOEDUS_ASSORTED_SPIN_UNTIL_IMPL_HPP_
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
uint64_t spin_until(COND spin_until_cond)
Spin locally until the given condition returns true.
bool is_running_on_valgrind()
uint64_t elapsed() const __attribute__((always_inline))
void spinlock_yield()
Invoke _mm_pause(), x86 PAUSE instruction, or something equivalent in the env.
A RDTSC-based low-overhead stop watch.
uint64_t stop() __attribute__((always_inline))
Take another current time tick.
void yield_if_valgrind()
Use this in your while as a stop-gap before switching to spin_until().