mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
doc: Clarify that _locker_new() does not actually allocate memory
It is important to document the performance (non-)impact of such critical functions.
This commit is contained in:
parent
a0e74a8c47
commit
8c61dce545
@ -283,6 +283,8 @@ typedef void GMutexLocker;
|
||||
* g_mutex_locker_free(). Using g_mutex_unlock() on @mutex
|
||||
* while a #GMutexLocker exists can lead to undefined behaviour.
|
||||
*
|
||||
* No allocation is performed, it is equivalent to a g_mutex_lock() call.
|
||||
*
|
||||
* This is intended to be used with g_autoptr(). Note that g_autoptr()
|
||||
* is only available when using GCC or clang, so the following example
|
||||
* will only work with those compilers:
|
||||
@ -328,6 +330,8 @@ g_mutex_locker_new (GMutex *mutex)
|
||||
*
|
||||
* Unlock @locker's mutex. See g_mutex_locker_new() for details.
|
||||
*
|
||||
* No memory is freed, it is equivalent to a g_mutex_unlock() call.
|
||||
*
|
||||
* Since: 2.44
|
||||
*/
|
||||
static inline void
|
||||
@ -352,6 +356,8 @@ typedef void GRecMutexLocker;
|
||||
* g_rec_mutex_locker_free(). Using g_rec_mutex_unlock() on @rec_mutex
|
||||
* while a #GRecMutexLocker exists can lead to undefined behaviour.
|
||||
*
|
||||
* No allocation is performed, it is equivalent to a g_rec_mutex_lock() call.
|
||||
*
|
||||
* This is intended to be used with g_autoptr(). Note that g_autoptr()
|
||||
* is only available when using GCC or clang, so the following example
|
||||
* will only work with those compilers:
|
||||
@ -397,6 +403,8 @@ g_rec_mutex_locker_new (GRecMutex *rec_mutex)
|
||||
*
|
||||
* Unlock @locker's recursive mutex. See g_rec_mutex_locker_new() for details.
|
||||
*
|
||||
* No memory is freed, it is equivalent to a g_rec_mutex_unlock() call.
|
||||
*
|
||||
* Since: 2.60
|
||||
*/
|
||||
static inline void
|
||||
@ -422,6 +430,8 @@ typedef void GRWLockWriterLocker;
|
||||
* on @rw_lock while a #GRWLockWriterLocker exists can lead to undefined
|
||||
* behaviour.
|
||||
*
|
||||
* No allocation is performed, it is equivalent to a g_rw_lock_writer_lock() call.
|
||||
*
|
||||
* This is intended to be used with g_autoptr(). Note that g_autoptr()
|
||||
* is only available when using GCC or clang, so the following example
|
||||
* will only work with those compilers:
|
||||
@ -498,6 +508,8 @@ g_rw_lock_writer_locker_new (GRWLock *rw_lock)
|
||||
* Release a write lock on @locker's read-write lock. See
|
||||
* g_rw_lock_writer_locker_new() for details.
|
||||
*
|
||||
* No memory is freed, it is equivalent to a g_rw_lock_writer_unlock() call.
|
||||
*
|
||||
* Since: 2.62
|
||||
*/
|
||||
static inline void
|
||||
@ -523,6 +535,8 @@ typedef void GRWLockReaderLocker;
|
||||
* on @rw_lock while a #GRWLockReaderLocker exists can lead to undefined
|
||||
* behaviour.
|
||||
*
|
||||
* No allocation is performed, it is equivalent to a g_rw_lock_reader_lock() call.
|
||||
*
|
||||
* This is intended to be used with g_autoptr(). For a code sample, see
|
||||
* g_rw_lock_writer_locker_new().
|
||||
*
|
||||
@ -543,6 +557,8 @@ g_rw_lock_reader_locker_new (GRWLock *rw_lock)
|
||||
* Release a read lock on @locker's read-write lock. See
|
||||
* g_rw_lock_reader_locker_new() for details.
|
||||
*
|
||||
* No memory is freed, it is equivalent to a g_rw_lock_reader_unlock() call.
|
||||
*
|
||||
* Since: 2.62
|
||||
*/
|
||||
static inline void
|
||||
|
Loading…
Reference in New Issue
Block a user