blob: 7135d081112444d7ab60fa24433a8f10e0bcab81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#ifndef SPIN_LOCK_BASE_INL_H_
#error "Direct inclusion of this file is not allowed, include spin_lock_base.h"
// For the sake of sane code completion.
#include "spin_lock_base.h"
#endif
#undef SPIN_LOCK_BASE_INL_H_
#include <library/cpp/yt/misc/source_location.h>
namespace NYT::NThreading {
////////////////////////////////////////////////////////////////////////////////
inline constexpr TSpinLockBase::TSpinLockBase()
: Location_({}, -1)
{ }
inline constexpr TSpinLockBase::TSpinLockBase(const ::TSourceLocation& location)
: Location_(location)
{ }
////////////////////////////////////////////////////////////////////////////////
template <class TLock, auto LocationLite>
TSpinLockInplace<TLock, LocationLite>::TSpinLockInplace()
: TLock(::TSourceLocation{LocationLite.FileName, LocationLite.Line})
{ }
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT::NThreading
|