TutRwMutexGetReadQuota get the current simultaneous reader quota of a R/W mutex
T_BOOL TutRwMutexGetReadQuota(rw_mutex
,read_quota_return
) T_RW_MUTEXrw_mutex
; T_INT4 *read_quota_return
;
rw_mutex
R/W mutex object to query
read_quota_return
pointer to location of an INT4 field into which the read quota is stored
TRUE
if query was successful, FALSE
otherwise.
If TutRwMutexGetReadQuota fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TutRwMutexGetReadQuota retrieves the current simultaneous reader quota of a R/W mutex. This quota increases dynamically as necessary to allocate additional resources for concurrent reader-threads. By querying the current value, it is possible to determine the high-water mark of reader-threads that have locked a given R/W mutex concurrently.
None
TutRwMutexCreate, TutRwMutexSetReadQuota
This example gets the reader quota from a R/W mutex:
T_RW_MUTEX rw_mutex;
T_INT4 quota;
.
.
.
if (!TutRwMutexGetReadQuota(rw_mutex, "a)) {
/* error */
}
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |