timer.c revision 6052dab738a9ad320742b0f286cb81a711a07663
f4f73ec517c5389acb234bc737265f8c98ad17f9Michael Sawyer * We use macros instead of calling the routines directly because
f4f73ec517c5389acb234bc737265f8c98ad17f9Michael Sawyer * the capital letters make the locking stand out.
f4f73ec517c5389acb234bc737265f8c98ad17f9Michael Sawyer * We INSIST that they succeed since there's no way for us to continue
f4f73ec517c5389acb234bc737265f8c98ad17f9Michael Sawyer * if they fail.
(t).nanoseconds == 0)
#ifdef ISC_TIMER_TRACE
#define XTRACE(s)
#define XTRACEID(s, t)
#define XTRACETIME(s, d)
#define XTRACETIMER(s, t, d)
struct isc_timer {
unsigned int magic;
unsigned int references;
void * arg;
unsigned int index;
struct isc_timermgr {
unsigned int magic;
unsigned int nscheduled;
static inline isc_result
int cmp;
switch (cmp) {
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
if (need_wakeup) {
return (ISC_R_UNEXPECTED);
return (ISC_R_NOMEMORY);
return (ISC_R_UNEXPECTED);
return (result);
return (ISC_R_UNEXPECTED);
if (purge)
return (result);
return (ISC_R_UNEXPECTED);
return (ISC_R_SUCCESS);
if (free_timer)
if (post_event) {
type,
sizeof *event);
if (need_schedule) {
result);
static isc_threadresult_t
return ((isc_threadresult_t)0);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
return (ISC_R_NOMEMORY);
return (ISC_R_NOMEMORY);
return (ISC_R_UNEXPECTED);
return (ISC_R_UNEXPECTED);
return (ISC_R_UNEXPECTED);
return (ISC_R_SUCCESS);