Added changes for mutex profiling.

This commit is contained in:
Damien Neil
2001-01-04 23:38:37 +00:00
parent b2a6ebf1bd
commit 2e36a55861
2 changed files with 12 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: condition.h,v 1.18 2000/08/01 01:31:05 tale Exp $ */
/* $Id: condition.h,v 1.19 2001/01/04 23:38:37 neild Exp $ */
#ifndef ISC_CONDITION_H
#define ISC_CONDITION_H 1
@@ -31,9 +31,15 @@ typedef pthread_cond_t isc_condition_t;
((pthread_cond_init((cp), NULL) == 0) ? \
ISC_R_SUCCESS : ISC_R_UNEXPECTED)
#if ISC_MUTEX_PROFILE
#define isc_condition_wait(cp, mp) \
((pthread_cond_wait((cp), (mp->mutex)) == 0) ? \
ISC_R_SUCCESS : ISC_R_UNEXPECTED)
#else
#define isc_condition_wait(cp, mp) \
((pthread_cond_wait((cp), (mp)) == 0) ? \
ISC_R_SUCCESS : ISC_R_UNEXPECTED)
#endif
#define isc_condition_signal(cp) \
((pthread_cond_signal((cp)) == 0) ? \