Index: ng_sscop_cust.h =================================================================== RCS file: /home/ncvs/src/sys/netgraph/atm/sscop/ng_sscop_cust.h,v retrieving revision 1.1 diff -u -r1.1 ng_sscop_cust.h --- ng_sscop_cust.h 24 Oct 2003 07:39:11 -0000 1.1 +++ ng_sscop_cust.h 3 Nov 2004 10:39:27 -0000 @@ -105,18 +105,18 @@ /* * Timer support. */ -typedef struct callout_handle sscop_timer_t; -#define TIMER_INIT(S, T) callout_handle_init(&(S)->t_##T) +typedef struct callout sscop_timer_t; +#define TIMER_INIT(S, T) ng_callout_init(&(S)->t_##T) #define TIMER_STOP(S,T) do { \ - ng_untimeout((S)->t_##T, (S)->aarg); \ - callout_handle_init(&(S)->t_##T); \ + ng_untimeout(&(S)->t_##T, (S)->aarg); \ } while (0) #define TIMER_RESTART(S, T) do { \ TIMER_STOP(S, T); \ - (S)->t_##T = ng_timeout((S)->aarg, NULL, \ + ng_timeout(&(S)->t_##T, (S)->aarg, NULL, \ hz * (S)->timer##T / 1000, T##_func, (S), 0); \ } while (0) -#define TIMER_ISACT(S, T) ((S)->t_##T.callout != NULL) +#define TIMER_ISACT(S, T) ((S)->t_##T.c_flags & (CALLOUT_ACTIVE | \ + CALLOUT_PENDING)) /* * This assumes, that the user argument is the node pointer. @@ -127,7 +127,6 @@ { \ struct sscop *sscop = arg1; \ \ - callout_handle_init(&sscop->t_##T); \ VERBOSE(sscop, SSCOP_DBG_TIMER, (sscop, sscop->aarg, \ "timer_" #T " expired")); \ sscop_signal(sscop, SIG_T_##N, NULL); \