Commit a29de510 authored by marko's avatar marko

branches/zip: Clean up some function comments.

parent a092c0a7
...@@ -210,28 +210,21 @@ UNIV_INLINE ...@@ -210,28 +210,21 @@ UNIV_INLINE
void void
rw_lock_s_unlock_func( rw_lock_s_unlock_func(
/*==================*/ /*==================*/
rw_lock_t* lock /* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG #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 */ been passed to another thread to unlock */
#endif #endif
); rw_lock_t* lock); /* in/out: rw-lock */
/***********************************************************************
Releases a shared mode lock. */
#ifdef UNIV_SYNC_DEBUG #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 #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 #endif
/*********************************************************************** /***********************************************************************
Releases a shared mode lock. */ 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 NOTE! The following macro should be used in rw x-locking, not the
corresponding function. */ corresponding function. */
...@@ -274,28 +267,21 @@ UNIV_INLINE ...@@ -274,28 +267,21 @@ UNIV_INLINE
void void
rw_lock_x_unlock_func( rw_lock_x_unlock_func(
/*==================*/ /*==================*/
rw_lock_t* lock /* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG #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 */ been passed to another thread to unlock */
#endif #endif
); rw_lock_t* lock); /* in/out: rw-lock */
/***********************************************************************
Releases an exclusive mode lock. */
#ifdef UNIV_SYNC_DEBUG #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 #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 #endif
/*********************************************************************** /***********************************************************************
Releases an exclusive mode lock. */ 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 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. is possible and none else is currently accessing the rw-lock structure.
...@@ -304,10 +290,9 @@ UNIV_INLINE ...@@ -304,10 +290,9 @@ UNIV_INLINE
void void
rw_lock_s_lock_direct( 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 */ 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 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. is not locked and none else is currently accessing the rw-lock structure.
...@@ -316,10 +301,9 @@ UNIV_INLINE ...@@ -316,10 +301,9 @@ UNIV_INLINE
void void
rw_lock_x_lock_direct( 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 */ 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 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 x-latch on a buffer frame to the current thread. The x-latch was set by
...@@ -341,7 +325,7 @@ UNIV_INLINE ...@@ -341,7 +325,7 @@ UNIV_INLINE
void void
rw_lock_s_unlock_direct( 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 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. */ none else will access the lock durint the time this function is executed. */
...@@ -349,7 +333,7 @@ UNIV_INLINE ...@@ -349,7 +333,7 @@ UNIV_INLINE
void void
rw_lock_x_unlock_direct( 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 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. */ mutex, so the caller must be sure it is not changed during the call. */
......
...@@ -334,7 +334,7 @@ UNIV_INLINE ...@@ -334,7 +334,7 @@ UNIV_INLINE
void void
rw_lock_s_lock_direct( 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 */ const char* file_name, /* in: file name where requested */
ulint line) /* in: line where lock requested */ ulint line) /* in: line where lock requested */
{ {
...@@ -359,7 +359,7 @@ UNIV_INLINE ...@@ -359,7 +359,7 @@ UNIV_INLINE
void void
rw_lock_x_lock_direct( 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 */ const char* file_name, /* in: file name where requested */
ulint line) /* in: line where lock requested */ ulint line) /* in: line where lock requested */
{ {
...@@ -486,12 +486,11 @@ UNIV_INLINE ...@@ -486,12 +486,11 @@ UNIV_INLINE
void void
rw_lock_s_unlock_func( rw_lock_s_unlock_func(
/*==================*/ /*==================*/
rw_lock_t* lock /* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG #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 */ been passed to another thread to unlock */
#endif #endif
) rw_lock_t* lock) /* in/out: rw-lock */
{ {
ut_ad((lock->lock_word % X_LOCK_DECR) != 0); ut_ad((lock->lock_word % X_LOCK_DECR) != 0);
...@@ -524,7 +523,7 @@ UNIV_INLINE ...@@ -524,7 +523,7 @@ UNIV_INLINE
void void
rw_lock_s_unlock_direct( 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); ut_ad(lock->lock_word < X_LOCK_DECR);
...@@ -548,12 +547,11 @@ UNIV_INLINE ...@@ -548,12 +547,11 @@ UNIV_INLINE
void void
rw_lock_x_unlock_func( rw_lock_x_unlock_func(
/*==================*/ /*==================*/
rw_lock_t* lock /* in: rw-lock */
#ifdef UNIV_SYNC_DEBUG #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 */ been passed to another thread to unlock */
#endif #endif
) rw_lock_t* lock) /* in/out: rw-lock */
{ {
ut_ad((lock->lock_word % X_LOCK_DECR) == 0); ut_ad((lock->lock_word % X_LOCK_DECR) == 0);
...@@ -599,7 +597,7 @@ UNIV_INLINE ...@@ -599,7 +597,7 @@ UNIV_INLINE
void void
rw_lock_x_unlock_direct( 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 /* Reset the exclusive lock if this thread no longer has an x-mode
lock */ lock */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment