LeviLamina
Loading...
Searching...
No Matches
SpinLockImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5class SpinLockImpl {
6public:
7 // member variables
8 // NOLINTBEGIN
9 ::ll::TypedStorage<1, 1, ::std::hash<::std::thread::id>> mThreadHasher;
10 ::ll::TypedStorage<4, 4, uint> mOwnerRefCount;
11 ::ll::TypedStorage<8, 8, uint64 const> mNoThreadId;
12 ::ll::TypedStorage<8, 8, ::std::atomic<uint64>> mOwnerThread;
13 // NOLINTEND
14
15public:
16 // member functions
17 // NOLINTBEGIN
18 MCAPI SpinLockImpl();
19
20 MCAPI void lock();
21
22 MCAPI bool try_lock();
23
24 MCAPI void unlock();
25
26 MCAPI ~SpinLockImpl();
27 // NOLINTEND
28
29public:
30 // constructor thunks
31 // NOLINTBEGIN
32 MCAPI void* $ctor();
33 // NOLINTEND
34
35public:
36 // destructor thunk
37 // NOLINTBEGIN
38 MCFOLD void $dtor();
39 // NOLINTEND
40};