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
6eb200a4
Commit
6eb200a4
authored
Aug 23, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enclose rw_lock_validate() in #ifdef UNIV_DEBUG. It is only called by
debug assertions.
parent
20d53145
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
include/sync0rw.h
include/sync0rw.h
+2
-0
sync/sync0rw.c
sync/sync0rw.c
+3
-3
No files found.
include/sync0rw.h
View file @
6eb200a4
...
...
@@ -101,6 +101,7 @@ void
rw_lock_free
(
/*=========*/
rw_lock_t
*
lock
);
/* in: rw-lock */
#ifdef UNIV_DEBUG
/**********************************************************************
Checks that the rw-lock has been initialized and that there are no
simultaneous shared and exclusive locks. */
...
...
@@ -109,6 +110,7 @@ ibool
rw_lock_validate
(
/*=============*/
rw_lock_t
*
lock
);
#endif
/* UNIV_DEBUG */
/******************************************************************
NOTE! The following macros should be used in rw s-locking, not the
corresponding function. */
...
...
sync/sync0rw.c
View file @
6eb200a4
...
...
@@ -174,9 +174,7 @@ rw_lock_free(
/*=========*/
rw_lock_t
*
lock
)
/* in: rw-lock */
{
#ifdef UNIV_DEBUG
ut_a
(
rw_lock_validate
(
lock
));
#endif
/* UNIV_DEBUG */
ut_ad
(
rw_lock_validate
(
lock
));
ut_a
(
rw_lock_get_writer
(
lock
)
==
RW_LOCK_NOT_LOCKED
);
ut_a
(
rw_lock_get_waiters
(
lock
)
==
0
);
ut_a
(
rw_lock_get_reader_count
(
lock
)
==
0
);
...
...
@@ -199,6 +197,7 @@ rw_lock_free(
mutex_exit
(
&
rw_lock_list_mutex
);
}
#ifdef UNIV_DEBUG
/**********************************************************************
Checks that the rw-lock has been initialized and that there are no
simultaneous shared and exclusive locks. */
...
...
@@ -226,6 +225,7 @@ rw_lock_validate(
return
(
TRUE
);
}
#endif
/* UNIV_DEBUG */
/**********************************************************************
Lock an rw-lock in shared mode for the current thread. If the rw-lock is
...
...
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