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
a29de510
Commit
a29de510
authored
May 20, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Clean up some function comments.
parent
a092c0a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
42 deletions
+24
-42
include/sync0rw.h
include/sync0rw.h
+16
-32
include/sync0rw.ic
include/sync0rw.ic
+8
-10
No files found.
include/sync0rw.h
View file @
a29de510
...
...
@@ -210,28 +210,21 @@ UNIV_INLINE
void
rw_lock_s_unlock_func
(
/*==================*/
rw_lock_t
*
lock
/* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG
,
ulint
pass
/* in: pass value; != 0, if the lock may have
ulint
pass
,
/* in: pass value; != 0, if the lock may have
been passed to another thread to unlock */
#endif
);
/***********************************************************************
Releases a shared mode lock. */
rw_lock_t
*
lock
);
/* in/out: rw-lock */
#ifdef UNIV_SYNC_DEBUG
#
define rw_lock_s_unlock(L) rw_lock_s_unlock_func(L, 0
)
#
define rw_lock_s_unlock_gen(L, P) rw_lock_s_unlock_func(P, L
)
#else
#
define rw_lock_s_unlock(L
) rw_lock_s_unlock_func(L)
#
define rw_lock_s_unlock_gen(L, P
) rw_lock_s_unlock_func(L)
#endif
/***********************************************************************
Releases a shared mode lock. */
#define rw_lock_s_unlock(L) rw_lock_s_unlock_gen(L, 0)
#ifdef UNIV_SYNC_DEBUG
#define rw_lock_s_unlock_gen(L, P) rw_lock_s_unlock_func(L, P)
#else
#define rw_lock_s_unlock_gen(L, P) rw_lock_s_unlock_func(L)
#endif
/******************************************************************
NOTE! The following macro should be used in rw x-locking, not the
corresponding function. */
...
...
@@ -274,28 +267,21 @@ UNIV_INLINE
void
rw_lock_x_unlock_func
(
/*==================*/
rw_lock_t
*
lock
/* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG
,
ulint
pass
/* in: pass value; != 0, if the lock may have
ulint
pass
,
/* in: pass value; != 0, if the lock may have
been passed to another thread to unlock */
#endif
);
/***********************************************************************
Releases an exclusive mode lock. */
rw_lock_t
*
lock
);
/* in/out: rw-lock */
#ifdef UNIV_SYNC_DEBUG
#
define rw_lock_x_unlock(L) rw_lock_x_unlock_func(L, 0
)
#
define rw_lock_x_unlock_gen(L, P) rw_lock_x_unlock_func(P, L
)
#else
#
define rw_lock_x_unlock(L
) rw_lock_x_unlock_func(L)
#
define rw_lock_x_unlock_gen(L, P
) rw_lock_x_unlock_func(L)
#endif
/***********************************************************************
Releases an exclusive mode lock. */
#define rw_lock_x_unlock(L) rw_lock_x_unlock_gen(L, 0)
#ifdef UNIV_SYNC_DEBUG
#define rw_lock_x_unlock_gen(L, P) rw_lock_x_unlock_func(L, P)
#else
#define rw_lock_x_unlock_gen(L, P) rw_lock_x_unlock_func(L)
#endif
/**********************************************************************
Low-level function which locks an rw-lock in s-mode when we know that it
is possible and none else is currently accessing the rw-lock structure.
...
...
@@ -304,10 +290,9 @@ UNIV_INLINE
void
rw_lock_s_lock_direct
(
/*==================*/
rw_lock_t
*
lock
,
/* in
: pointer to
rw-lock */
rw_lock_t
*
lock
,
/* in
/out:
rw-lock */
const
char
*
file_name
,
/* in: file name where requested */
ulint
line
/* in: line where lock requested */
);
ulint
line
);
/* in: line where lock requested */
/**********************************************************************
Low-level function which locks an rw-lock in x-mode when we know that it
is not locked and none else is currently accessing the rw-lock structure.
...
...
@@ -316,10 +301,9 @@ UNIV_INLINE
void
rw_lock_x_lock_direct
(
/*==================*/
rw_lock_t
*
lock
,
/* in
: pointer to
rw-lock */
rw_lock_t
*
lock
,
/* in
/out:
rw-lock */
const
char
*
file_name
,
/* in: file name where requested */
ulint
line
/* in: line where lock requested */
);
ulint
line
);
/* in: line where lock requested */
/**********************************************************************
This function is used in the insert buffer to move the ownership of an
x-latch on a buffer frame to the current thread. The x-latch was set by
...
...
@@ -341,7 +325,7 @@ UNIV_INLINE
void
rw_lock_s_unlock_direct
(
/*====================*/
rw_lock_t
*
lock
);
/* in: rw-lock */
rw_lock_t
*
lock
);
/* in
/out
: rw-lock */
/**********************************************************************
Releases an exclusive mode lock when we know there are no waiters, and
none else will access the lock durint the time this function is executed. */
...
...
@@ -349,7 +333,7 @@ UNIV_INLINE
void
rw_lock_x_unlock_direct
(
/*====================*/
rw_lock_t
*
lock
);
/* in: rw-lock */
rw_lock_t
*
lock
);
/* in
/out
: rw-lock */
/**********************************************************************
Returns the value of writer_count for the lock. Does not reserve the lock
mutex, so the caller must be sure it is not changed during the call. */
...
...
include/sync0rw.ic
View file @
a29de510
...
...
@@ -334,7 +334,7 @@ UNIV_INLINE
void
rw_lock_s_lock_direct(
/*==================*/
rw_lock_t* lock, /* in
: pointer to
rw-lock */
rw_lock_t* lock, /* in
/out:
rw-lock */
const char* file_name, /* in: file name where requested */
ulint line) /* in: line where lock requested */
{
...
...
@@ -359,7 +359,7 @@ UNIV_INLINE
void
rw_lock_x_lock_direct(
/*==================*/
rw_lock_t* lock, /* in
: pointer to
rw-lock */
rw_lock_t* lock, /* in
/out:
rw-lock */
const char* file_name, /* in: file name where requested */
ulint line) /* in: line where lock requested */
{
...
...
@@ -486,12 +486,11 @@ UNIV_INLINE
void
rw_lock_s_unlock_func(
/*==================*/
rw_lock_t* lock /* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG
,ulint pass
/* in: pass value; != 0, if the lock may have
ulint pass,
/* in: pass value; != 0, if the lock may have
been passed to another thread to unlock */
#endif
)
rw_lock_t* lock) /* in/out: rw-lock */
{
ut_ad((lock->lock_word % X_LOCK_DECR) != 0);
...
...
@@ -524,7 +523,7 @@ UNIV_INLINE
void
rw_lock_s_unlock_direct(
/*====================*/
rw_lock_t* lock) /* in: rw-lock */
rw_lock_t* lock) /* in
/out
: rw-lock */
{
ut_ad(lock->lock_word < X_LOCK_DECR);
...
...
@@ -548,12 +547,11 @@ UNIV_INLINE
void
rw_lock_x_unlock_func(
/*==================*/
rw_lock_t* lock /* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG
,ulint pass
/* in: pass value; != 0, if the lock may have
ulint pass,
/* in: pass value; != 0, if the lock may have
been passed to another thread to unlock */
#endif
)
rw_lock_t* lock) /* in/out: rw-lock */
{
ut_ad((lock->lock_word % X_LOCK_DECR) == 0);
...
...
@@ -599,7 +597,7 @@ UNIV_INLINE
void
rw_lock_x_unlock_direct(
/*====================*/
rw_lock_t* lock) /* in: rw-lock */
rw_lock_t* lock) /* in
/out
: rw-lock */
{
/* Reset the exclusive lock if this thread no longer has an x-mode
lock */
...
...
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