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
fd2c5d19
Commit
fd2c5d19
authored
Sep 26, 2017
by
Eugene Kosov
Committed by
Sergey Vojtovich
Sep 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a data race
reapply
6192f0bf
TSAN warnings count decreased from 206 to 195
parent
a02b81da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
41 deletions
+2
-41
storage/innobase/sync/sync0debug.cc
storage/innobase/sync/sync0debug.cc
+2
-41
No files found.
storage/innobase/sync/sync0debug.cc
View file @
fd2c5d19
...
@@ -49,14 +49,7 @@ my_bool srv_sync_debug;
...
@@ -49,14 +49,7 @@ my_bool srv_sync_debug;
/** The global mutex which protects debug info lists of all rw-locks.
/** The global mutex which protects debug info lists of all rw-locks.
To modify the debug info list of an rw-lock, this mutex has to be
To modify the debug info list of an rw-lock, this mutex has to be
acquired in addition to the mutex protecting the lock. */
acquired in addition to the mutex protecting the lock. */
static
ib_mutex_t
rw_lock_debug_mutex
;
static
SysMutex
rw_lock_debug_mutex
;
/** If deadlock detection does not get immediately the mutex,
it may wait for this event */
static
os_event_t
rw_lock_debug_event
;
/** This is set to true, if there may be waiters for the event */
static
bool
rw_lock_debug_waiters
;
/** The latch held by a thread */
/** The latch held by a thread */
struct
Latched
{
struct
Latched
{
...
@@ -1242,13 +1235,7 @@ void
...
@@ -1242,13 +1235,7 @@ void
LatchDebug
::
init
()
LatchDebug
::
init
()
UNIV_NOTHROW
UNIV_NOTHROW
{
{
ut_a
(
rw_lock_debug_event
==
NULL
);
mutex_create
(
LATCH_ID_RW_LOCK_DEBUG
,
&
rw_lock_debug_mutex
);
mutex_create
(
LATCH_ID_RW_LOCK_DEBUG
,
&
rw_lock_debug_mutex
);
rw_lock_debug_event
=
os_event_create
(
"rw_lock_debug_event"
);
rw_lock_debug_waiters
=
FALSE
;
}
}
/** Shutdown the latch debug checking
/** Shutdown the latch debug checking
...
@@ -1259,12 +1246,6 @@ void
...
@@ -1259,12 +1246,6 @@ void
LatchDebug
::
shutdown
()
LatchDebug
::
shutdown
()
UNIV_NOTHROW
UNIV_NOTHROW
{
{
ut_a
(
rw_lock_debug_event
!=
NULL
);
os_event_destroy
(
rw_lock_debug_event
);
rw_lock_debug_event
=
NULL
;
mutex_free
(
&
rw_lock_debug_mutex
);
mutex_free
(
&
rw_lock_debug_mutex
);
ut_a
(
s_initialized
);
ut_a
(
s_initialized
);
...
@@ -1284,22 +1265,7 @@ mutex. */
...
@@ -1284,22 +1265,7 @@ mutex. */
void
void
rw_lock_debug_mutex_enter
()
rw_lock_debug_mutex_enter
()
{
{
for
(;;)
{
mutex_enter
(
&
rw_lock_debug_mutex
);
if
(
0
==
mutex_enter_nowait
(
&
rw_lock_debug_mutex
))
{
return
;
}
os_event_reset
(
rw_lock_debug_event
);
rw_lock_debug_waiters
=
TRUE
;
if
(
0
==
mutex_enter_nowait
(
&
rw_lock_debug_mutex
))
{
return
;
}
os_event_wait
(
rw_lock_debug_event
);
}
}
}
/** Releases the debug mutex. */
/** Releases the debug mutex. */
...
@@ -1307,11 +1273,6 @@ void
...
@@ -1307,11 +1273,6 @@ void
rw_lock_debug_mutex_exit
()
rw_lock_debug_mutex_exit
()
{
{
mutex_exit
(
&
rw_lock_debug_mutex
);
mutex_exit
(
&
rw_lock_debug_mutex
);
if
(
rw_lock_debug_waiters
)
{
rw_lock_debug_waiters
=
FALSE
;
os_event_set
(
rw_lock_debug_event
);
}
}
}
#endif
/* UNIV_DEBUG */
#endif
/* UNIV_DEBUG */
...
...
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