#pragma once #include #include #include namespace NYT::NThreading { //////////////////////////////////////////////////////////////////////////////// DEFINE_ENUM(ESpinLockActivityKind, (Read) (Write) (ReadWrite) ); using TSpinWaitSlowPathHook = void(*)( TCpuDuration cpuDelay, const ::TSourceLocation& location, ESpinLockActivityKind activityKind); void RegisterSpinWaitSlowPathHook(TSpinWaitSlowPathHook hook); void InvokeSpinWaitSlowPathHooks( TCpuDuration cpuDelay, const ::TSourceLocation& location, ESpinLockActivityKind activityKind); //////////////////////////////////////////////////////////////////////////////// } // namespace NYT::NThreading