condition.h File Reference

#include <isc/lang.h>
#include <isc/mutex.h>
#include <isc/result.h>
#include <isc/types.h>

Go to the source code of this file.

Defines

#define ISC_CONDITION_H   1
#define isc_condition_init(cp)
#define isc_condition_wait(cp, mp)
#define isc_condition_signal(cp)
#define isc_condition_broadcast(cp)
#define isc_condition_destroy(cp)

Typedefs

typedef pthread_cond_t isc_condition_t

Functions

ISC_LANG_BEGINDECLS isc_result_t isc_condition_waituntil (isc_condition_t *, isc_mutex_t *, isc_time_t *)


Detailed Description

Definition in file condition.h.


Define Documentation

#define ISC_CONDITION_H   1

Definition at line 21 of file condition.h.

#define isc_condition_init ( cp   ) 

Value:

((pthread_cond_init((cp), NULL) == 0) ? \
         ISC_R_SUCCESS : ISC_R_UNEXPECTED)

Definition at line 32 of file condition.h.

#define isc_condition_wait ( cp,
mp   ) 

Value:

((pthread_cond_wait((cp), (mp)) == 0) ? \
         ISC_R_SUCCESS : ISC_R_UNEXPECTED)

Definition at line 41 of file condition.h.

#define isc_condition_signal ( cp   ) 

Value:

((pthread_cond_signal((cp)) == 0) ? \
         ISC_R_SUCCESS : ISC_R_UNEXPECTED)

Definition at line 46 of file condition.h.

#define isc_condition_broadcast ( cp   ) 

Value:

((pthread_cond_broadcast((cp)) == 0) ? \
         ISC_R_SUCCESS : ISC_R_UNEXPECTED)

Definition at line 50 of file condition.h.

#define isc_condition_destroy ( cp   ) 

Value:

((pthread_cond_destroy((cp)) == 0) ? \
         ISC_R_SUCCESS : ISC_R_UNEXPECTED)

Definition at line 54 of file condition.h.


Typedef Documentation

typedef pthread_cond_t isc_condition_t

Definition at line 30 of file condition.h.


Function Documentation

ISC_LANG_BEGINDECLS isc_result_t isc_condition_waituntil ( isc_condition_t ,
isc_mutex_t ,
isc_time_t  
)

POSIX defines a timespec's tv_nsec as long. isc_time_nanoseconds ensures its return value is < 1 billion, which will fit in a long.

Definition at line 34 of file condition.c.

References isc__strerror(), ISC_MSG_RETURNED, isc_msgcat_get(), ISC_MSGSET_GENERAL, ISC_R_RANGE, ISC_R_SUCCESS, ISC_R_TIMEDOUT, ISC_R_UNEXPECTED, ISC_STRERRORSIZE, isc_time_nanoseconds(), isc_time_secondsastimet(), REQUIRE, and UNEXPECTED_ERROR.


Generated on Tue Apr 28 17:41:18 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha