Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Kagome
Consensus
core
Development guide
Guide for `outcome::result<T>`
Rules
Terms
Tooling
Overview
Your first Kagome chain
Runing Kagome in docker container
Start private Kagome network
Namespaces
Classes
Files
File List
core
api
application
assets
authority_discovery
authorship
blockchain
clock
common
blob.cpp
blob.hpp
buffer.hpp
buffer_back_insert_iterator.hpp
buffer_view.hpp
empty.hpp
fd_limit.cpp
fd_limit.hpp
hexutil.cpp
hexutil.hpp
literals.hpp
monadic_utils.hpp
mp_utils.cpp
mp_utils.hpp
outcome_throw.hpp
size_limited_containers.hpp
spin_lock.cpp
spin_lock.hpp
stub.hpp
tagged.hpp
type_traits.hpp
unused.hpp
uri.cpp
uri.hpp
variant_builder.hpp
visitor.hpp
wrapper.hpp
consensus
containers
crypto
filesystem
host_api
injector
log
macro
metrics
network
offchain
outcome
parachain
primitives
runtime
scale
storage
subscription
telemetry
transaction_pool
utils
docs
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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