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
ed166f53
Commit
ed166f53
authored
Dec 20, 2018
by
Eugene Kosov
Committed by
Sergey Vojtovich
Dec 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18043 data race in os_event
os_event::is_set(): protect os_event::m_set with os_event::mutex
parent
b7a9563b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
storage/innobase/os/os0event.cc
storage/innobase/os/os0event.cc
+5
-2
No files found.
storage/innobase/os/os0event.cc
View file @
ed166f53
...
@@ -126,7 +126,10 @@ struct os_event {
...
@@ -126,7 +126,10 @@ struct os_event {
/** @return true if the event is in the signalled state. */
/** @return true if the event is in the signalled state. */
bool
is_set
()
const
UNIV_NOTHROW
bool
is_set
()
const
UNIV_NOTHROW
{
{
return
(
m_set
);
mutex
.
enter
();
bool
is_set
=
m_set
;
mutex
.
exit
();
return
is_set
;
}
}
private:
private:
...
@@ -224,7 +227,7 @@ struct os_event {
...
@@ -224,7 +227,7 @@ struct os_event {
int64_t
signal_count
;
/*!< this is incremented
int64_t
signal_count
;
/*!< this is incremented
each time the event becomes
each time the event becomes
signaled */
signaled */
EventMutex
mutex
;
/*!< this mutex protects
mutable
EventMutex
mutex
;
/*!< this mutex protects
the next fields */
the next fields */
...
...
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