Index: ng_uni_cust.h =================================================================== RCS file: /home/ncvs/src/sys/netgraph/atm/uni/ng_uni_cust.h,v retrieving revision 1.2 diff -u -r1.2 ng_uni_cust.h --- ng_uni_cust.h 25 Jun 2004 19:22:03 -0000 1.2 +++ ng_uni_cust.h 3 Nov 2004 15:08:17 -0000 @@ -79,19 +79,19 @@ * Timers */ struct uni_timer { - struct callout_handle c; + struct callout c; }; -#define _TIMER_INIT(X,T) callout_handle_init(&(X)->T.c) +#define _TIMER_INIT(X,T) ng_callout_init(&(X)->T.c) #define _TIMER_DESTROY(UNI,FIELD) _TIMER_STOP(UNI,FIELD) #define _TIMER_STOP(UNI,FIELD) do { \ - ng_untimeout(FIELD.c, (UNI)->arg); \ - callout_handle_init(&FIELD.c); \ + ng_untimeout(&FIELD.c, (UNI)->arg); \ } while (0) -#define TIMER_ISACT(UNI,T) ((UNI)->T.c.callout != NULL) +#define TIMER_ISACT(UNI,T) ((UNI)->T.c.c_flags & (CALLOUT_ACTIVE | \ + CALLOUT_PENDING)) #define _TIMER_START(UNI,ARG,FIELD,DUE,FUNC) do { \ _TIMER_STOP(UNI, FIELD); \ - FIELD.c = ng_timeout((UNI)->arg, NULL, \ + ng_timeout(&FIELD.c, (UNI)->arg, NULL, \ hz * (DUE) / 1000, FUNC, (ARG), 0); \ } while (0) @@ -102,7 +102,6 @@ { \ struct uni *uni = (struct uni *)arg1; \ \ - callout_handle_init(&uni->T.c); \ (F)(uni); \ uni_work(uni); \ } @@ -118,7 +117,6 @@ struct call *call = (struct call *)arg1; \ struct uni *uni = call->uni; \ \ - callout_handle_init(&call->T.c); \ (F)(call); \ uni_work(uni); \ } @@ -134,7 +132,6 @@ struct party *party = (struct party *)arg1; \ struct uni *uni = party->call->uni; \ \ - callout_handle_init(&party->T.c); \ (F)(party); \ uni_work(uni); \ }