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
6b0f2ce5
Commit
6b0f2ce5
authored
Dec 02, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup
6b2d1766
parent
6b2d1766
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
storage/innobase/sync/srw_lock.cc
storage/innobase/sync/srw_lock.cc
+7
-14
No files found.
storage/innobase/sync/srw_lock.cc
View file @
6b0f2ce5
...
...
@@ -52,25 +52,18 @@ inline void srw_lock_low::readers_wait(uint32_t l)
pthread_mutex_unlock
(
&
mutex
);
}
#if 0
inline void srw_lock_low::writer_wake()
{
pthread_mutex_lock(&mutex);
pthread_cond_broadcast(&cond_ex);
if (!(value() & WRITER_PENDING))
pthread_cond_broadcast(&cond);
pthread_mutex_unlock(&mutex);
}
#endif
inline
void
srw_lock_low
::
writer_wake
()
{
pthread_mutex_lock
(
&
mutex
);
uint32_t
l
=
value
();
if
(
!
(
l
&
WRITER
))
pthread_cond_broadcast
((
l
&
WRITER_PENDING
)
?
&
cond_ex
:
&
cond
);
else
if
(
l
&
WRITER
)
DBUG_ASSERT
(
!
(
l
&
~
WRITER_PENDING
));
else
{
pthread_cond_broadcast
(
&
cond_ex
);
if
(
!
(
l
&
WRITER_PENDING
))
pthread_cond_broadcast
(
&
cond
);
}
pthread_mutex_unlock
(
&
mutex
);
}
# define readers_wake writer_wake
...
...
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