Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
67dbfe6e
Commit
67dbfe6e
authored
Sep 19, 2018
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17441 - InnoDB transition to C++11 atomics
trx_t::n_ref transition to Atomic_counter.
parent
4abdd798
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
storage/innobase/include/trx0trx.h
storage/innobase/include/trx0trx.h
+6
-6
No files found.
storage/innobase/include/trx0trx.h
View file @
67dbfe6e
...
...
@@ -773,7 +773,7 @@ struct trx_t {
that it is no longer "active".
*/
int32_t
n_ref
;
Atomic_counter
<
int32_t
>
n_ref
;
public:
...
...
@@ -1119,16 +1119,16 @@ struct trx_t {
bool
is_referenced
()
{
return
my_atomic_load32_explicit
(
&
n_ref
,
MY_MEMORY_ORDER_RELAXED
)
>
0
;
return
n_ref
>
0
;
}
void
reference
()
{
#ifdef UNIV_DEBUG
int32_t
old_n_ref
=
auto
old_n_ref
=
#endif
my_atomic_add32_explicit
(
&
n_ref
,
1
,
MY_MEMORY_ORDER_RELAXED
)
;
n_ref
++
;
ut_ad
(
old_n_ref
>=
0
);
}
...
...
@@ -1136,9 +1136,9 @@ struct trx_t {
void
release_reference
()
{
#ifdef UNIV_DEBUG
int32_t
old_n_ref
=
auto
old_n_ref
=
#endif
my_atomic_add32_explicit
(
&
n_ref
,
-
1
,
MY_MEMORY_ORDER_RELAXED
)
;
n_ref
--
;
ut_ad
(
old_n_ref
>
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment