TutRwMutexGetReadQuota


Name

TutRwMutexGetReadQuota — get the current simultaneous reader quota of a R/W mutex

Synopsis

T_BOOL TutRwMutexGetReadQuota(rw_mutex, read_quota_return) 
T_RW_MUTEX rw_mutex; 
T_INT4 *read_quota_return; 

Arguments

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

Return Values

TRUE if query was successful, FALSE otherwise.

Diagnostics

If TutRwMutexGetReadQuota fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

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.

Caution

None

See Also

TutRwMutexCreate, TutRwMutexSetReadQuota

Examples

This example gets the reader quota from a R/W mutex:

T_RW_MUTEX rw_mutex; 
T_INT4 quota; 
. 
. 
. 
if (!TutRwMutexGetReadQuota(rw_mutex, &quota)) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com