BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
a
c
d
e
g
h
l
n
o
t
w
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
a
b
c
d
e
f
g
h
m
n
o
p
s
t
u
v
w
y
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Functions
Variables
Typedefs
Macros
_
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
libraries
fc
include
fc
thread
non_preemptable_scope_check.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
fc/time.hpp
>
3
#include <
fc/thread/spin_yield_lock.hpp
>
4
5
// This file defines a macro:
6
// ASSERT_TASK_NOT_PREEMPTED()
7
// This macro is used to declare that the current scope is not expected to yield.
8
// If the task does yield, it will generate an assertion.
9
//
10
// Use this when you you're coding somethign that must not yield, and you think you
11
// have done it (just by virtue of the fact that you don't think you've called any
12
// functions that could yield). This will help detect when your assumptions are
13
// wrong and you accidentally call something that yields.
14
//
15
// This has no cost in release mode, and is extremely cheap in debug mode.
16
17
#define FC_NON_PREEMPTABLE_SCOPE_COMBINE_HELPER(x,y) x ## y
18
#define FC_NON_PREEMPTABLE_SCOPE_COMBINE(x,y) FC_NON_PREEMPTABLE_SCOPE_COMBINE_HELPER(x,y)
19
20
#ifdef NDEBUG
21
# define ASSERT_TASK_NOT_PREEMPTED() do {} while (0)
22
#else
23
# define ASSERT_TASK_NOT_PREEMPTED() fc::non_preemptable_scope_check FC_NON_PREEMPTABLE_SCOPE_COMBINE(scope_checker_, __LINE__)
24
25
namespace
fc
26
{
27
class
non_preemptable_scope_check
28
{
29
public
:
30
non_preemptable_scope_check
();
31
~non_preemptable_scope_check
();
32
};
33
}
// namespace fc
34
#endif
35
fc
Definition:
api.hpp:15
spin_yield_lock.hpp
fc::non_preemptable_scope_check::non_preemptable_scope_check
non_preemptable_scope_check()
Definition:
non_preemptable_scope_check.cpp:9
fc::non_preemptable_scope_check::~non_preemptable_scope_check
~non_preemptable_scope_check()
Definition:
non_preemptable_scope_check.cpp:14
time.hpp
fc::non_preemptable_scope_check
Definition:
non_preemptable_scope_check.hpp:27
Generated on Fri Dec 15 2023 06:12:42 for BitShares-Core by
1.8.17