34static struct timeout *free_timeouts;
62 t ->
next = free_timeouts;
137 log_info (
"System time has been changed. Unable to use existing leases. Restarting");
143 log_fatal (
"Dispatch routine failed: %s -- exiting",
183 (*(
q->func)) (
q->what);
185 (*
q->unref) (&
q->what,
MDL);
187 q->
next = free_timeouts;
196 log_error(
"Error finding timer structure");
204#define USEC_MAX 1000000
245 free_timeouts =
q->
next;
283 if ((
when->tv_usec != 0) && (
usec < 0)) {
293 "reducing to: %lu (TIME_MAX - 1)",
297 }
else if (
usec < 0) {
309 q->when.tv_usec =
usec;
335 if ((
t->next->when.tv_sec >
q->when.tv_sec) ||
336 ((
t->next->when.tv_sec ==
q->when.tv_sec) &&
337 (
t->next->when.tv_usec >
q->when.tv_usec))) {
375 (
void *)
q, &
q->isc_timeout);
384 log_fatal(
"Unable to add timeout to isclib\n");
424 (*
q->unref) (&
q->what,
MDL);
425 q->next = free_timeouts;
430#if defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
437 if (
t->unref &&
t->what)
438 (*
t->unref) (&
t->what,
MDL);
439 t->next = free_timeouts;
447 for (
t = free_timeouts;
t;
t =
n) {
void add_timeout(struct timeval *when, void *where, void *what, tvref_t ref, tvunref_t unref)
void isclib_timer_callback(isc_task_t *taskp, isc_event_t *eventp)
struct timeval * process_outstanding_timeouts(struct timeval *tvp)
struct timeout * timeouts
void cancel_timeout(void *where, void *what)
isc_result_t dhcp_set_control_state(control_object_state_t oldstate, control_object_state_t newstate)
void cancel_all_timeouts(void)
void(* tvunref_t)(void *, const char *, int)
void relinquish_timeouts(void)
void(* tvref_t)(void *, void *, const char *, int)
dhcp_context_t dhcp_gbl_ctx
void * dmalloc(size_t, const char *, int)
void dfree(void *, const char *, int)
int log_error(const char *,...) __attribute__((__format__(__printf__
void log_fatal(const char *,...) __attribute__((__format__(__printf__
int int log_info(const char *,...) __attribute__((__format__(__printf__
isc_timermgr_t * timermgr