summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2015-04-17 15:39:42 +0000
committerrrs <rrs@FreeBSD.org>2015-04-17 15:39:42 +0000
commit5b2ecd30717091264c0e382e53e9a9cd912386ff (patch)
tree67cf6e12d33111f0cf9dd88af92f51b04ac06a7a /sys/netgraph
parent8089a48fdb4c49ec32bd8e49f22449da9a116d5b (diff)
downloadFreeBSD-src-5b2ecd30717091264c0e382e53e9a9cd912386ff.zip
FreeBSD-src-5b2ecd30717091264c0e382e53e9a9cd912386ff.tar.gz
MFC of r280785, r280871, r280872, r281510, r218511 - callout fixes.
Sponsored by: Netflix Inc.
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/atm/sscop/ng_sscop_cust.h2
-rw-r--r--sys/netgraph/atm/uni/ng_uni_cust.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/netgraph/atm/sscop/ng_sscop_cust.h b/sys/netgraph/atm/sscop/ng_sscop_cust.h
index a1d839a..50acf93 100644
--- a/sys/netgraph/atm/sscop/ng_sscop_cust.h
+++ b/sys/netgraph/atm/sscop/ng_sscop_cust.h
@@ -115,7 +115,7 @@ typedef struct callout sscop_timer_t;
ng_callout(&(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.c_flags & (CALLOUT_PENDING))
+#define TIMER_ISACT(S, T) (callout_pending(&(S)->t_##T))
/*
* This assumes, that the user argument is the node pointer.
diff --git a/sys/netgraph/atm/uni/ng_uni_cust.h b/sys/netgraph/atm/uni/ng_uni_cust.h
index 4336e57..12cd865 100644
--- a/sys/netgraph/atm/uni/ng_uni_cust.h
+++ b/sys/netgraph/atm/uni/ng_uni_cust.h
@@ -87,8 +87,8 @@ struct uni_timer {
#define _TIMER_STOP(UNI,FIELD) do { \
ng_uncallout(&FIELD.c, (UNI)->arg); \
} while (0)
-#define TIMER_ISACT(UNI,T) ((UNI)->T.c.c_flags & (CALLOUT_ACTIVE | \
- CALLOUT_PENDING))
+#define TIMER_ISACT(UNI,T) (callout_active(&(UNI)->T.c) || \
+ callout_pending(&(UNI)->T.c))
#define _TIMER_START(UNI,ARG,FIELD,DUE,FUNC) do { \
_TIMER_STOP(UNI, FIELD); \
ng_callout(&FIELD.c, (UNI)->arg, NULL, \
OpenPOWER on IntegriCloud