Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
spin_lock.cpp
Go to the documentation of this file.
1
6
#include "
common/spin_lock.hpp
"
7
8
namespace
kagome::common
{
9
10
void
spin_lock::lock
() {
11
while
(
flag_
.test_and_set(std::memory_order_acquire)) {
12
}
13
}
14
15
void
spin_lock::unlock
() {
16
flag_
.clear(std::memory_order_release);
17
}
18
19
}
// namespace kagome::common
kagome::common::spin_lock::flag_
std::atomic_flag flag_
Definition:
spin_lock.hpp:54
kagome::common::spin_lock::lock
void lock()
Definition:
spin_lock.cpp:10
kagome::common
Definition:
blob.cpp:19
spin_lock.hpp
kagome::common::spin_lock::unlock
void unlock()
Definition:
spin_lock.cpp:15
core
common
spin_lock.cpp
Generated by
1.8.11