MCPcopy Create free account
hub / github.com/apache/impala / CpuWait

Method CpuWait

be/src/common/atomic.h:37–39  ·  view source on GitHub ↗

Issues instruction to have the CPU wait, this is less busy (bus traffic etc) than just spinning. For example: while (1); should be: while (1) CpuWait();

Source from the content-addressed store, hash-verified

35 /// should be:
36 /// while (1) CpuWait();
37 static ALWAYS_INLINE void CpuWait() {
38 base::subtle::PauseCPU();
39 }
40
41 /// Provides "barrier" semantics (see below) without a memory access.
42 static ALWAYS_INLINE void MemoryBarrier() {

Callers

nothing calls this directly

Calls 1

PauseCPUFunction · 0.85

Tested by

no test coverage detected