24 #ifndef PXR_BASE_ARCH_THREADS_H
25 #define PXR_BASE_ARCH_THREADS_H
37 #ifdef ARCH_COMPILER_MSVC
54 #if defined(ARCH_CPU_INTEL)
55 #if defined(ARCH_COMPILER_GCC) || defined(ARCH_COMPILER_CLANG)
56 #define ARCH_SPIN_PAUSE() __builtin_ia32_pause()
57 #elif defined(ARCH_COMPILER_MSVC)
58 #define ARCH_SPIN_PAUSE() _mm_pause()
60 #elif defined(ARCH_CPU_ARM)
61 #if defined(ARCH_COMPILER_GCC) || defined(ARCH_COMPILER_CLANG)
62 #define ARCH_SPIN_PAUSE() asm volatile ("yield" ::: "memory")
63 #elif defined(ARCH_COMPILER_MSVC)
64 #define ARCH_SPIN_PAUSE() __yield();
67 #define ARCH_SPIN_PAUSE()
72 #endif // PXR_BASE_ARCH_THREADS_H
ARCH_API std::thread::id ArchGetMainThreadId()
PXR_NAMESPACE_OPEN_SCOPE ARCH_API bool ArchIsMainThread()
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE