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
03e46163
Commit
03e46163
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
fil_validate_count transition to Atomic_counter.
parent
ca83115b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
12 deletions
+3
-12
storage/innobase/fil/fil0fil.cc
storage/innobase/fil/fil0fil.cc
+2
-10
storage/innobase/include/dict0dict.h
storage/innobase/include/dict0dict.h
+0
-1
storage/innobase/include/univ.i
storage/innobase/include/univ.i
+1
-0
storage/innobase/include/ut0counter.h
storage/innobase/include/ut0counter.h
+0
-1
No files found.
storage/innobase/fil/fil0fil.cc
View file @
03e46163
...
@@ -204,19 +204,11 @@ fil_validate_skip(void)
...
@@ -204,19 +204,11 @@ fil_validate_skip(void)
/*===================*/
/*===================*/
{
{
/** The fil_validate() call skip counter. */
/** The fil_validate() call skip counter. */
static
int
fil_validate_count
=
FIL_VALIDATE_SKIP
;
static
Atomic_counter
<
uint32_t
>
fil_validate_count
;
/* We want to reduce the call frequency of the costly fil_validate()
/* We want to reduce the call frequency of the costly fil_validate()
check in debug builds. */
check in debug builds. */
int
count
=
my_atomic_add32_explicit
(
&
fil_validate_count
,
-
1
,
return
(
fil_validate_count
++
%
FIL_VALIDATE_SKIP
)
||
fil_validate
();
MY_MEMORY_ORDER_RELAXED
);
if
(
count
>
0
)
{
return
(
true
);
}
my_atomic_store32_explicit
(
&
fil_validate_count
,
FIL_VALIDATE_SKIP
,
MY_MEMORY_ORDER_RELAXED
);
return
(
fil_validate
());
}
}
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
...
...
storage/innobase/include/dict0dict.h
View file @
03e46163
...
@@ -31,7 +31,6 @@ Created 1/8/1996 Heikki Tuuri
...
@@ -31,7 +31,6 @@ Created 1/8/1996 Heikki Tuuri
#include "data0data.h"
#include "data0data.h"
#include "dict0mem.h"
#include "dict0mem.h"
#include "fsp0fsp.h"
#include "fsp0fsp.h"
#include <atomic>
#include <deque>
#include <deque>
extern
bool
innodb_table_stats_not_found
;
extern
bool
innodb_table_stats_not_found
;
...
...
storage/innobase/include/univ.i
View file @
03e46163
...
@@ -83,6 +83,7 @@ used throughout InnoDB but do not include too much themselves. They
...
@@ -83,6 +83,7 @@ used throughout InnoDB but do not include too much themselves. They
support cross-platform development and expose comonly used SQL names. */
support cross-platform development and expose comonly used SQL names. */
#
include
<
my_global
.
h
>
#
include
<
my_global
.
h
>
#
include
"my_counter.h"
/* JAN: TODO: missing 5.7 header */
/* JAN: TODO: missing 5.7 header */
#
ifdef
HAVE_MY_THREAD_H
#
ifdef
HAVE_MY_THREAD_H
...
...
storage/innobase/include/ut0counter.h
View file @
03e46163
...
@@ -29,7 +29,6 @@ Created 2012/04/12 by Sunny Bains
...
@@ -29,7 +29,6 @@ Created 2012/04/12 by Sunny Bains
#define ut0counter_h
#define ut0counter_h
#include "os0thread.h"
#include "os0thread.h"
#include <atomic>
#include "my_rdtsc.h"
#include "my_rdtsc.h"
/** CPU cache line size */
/** CPU cache line size */
...
...
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