From c3d884ae9e7383037071b8f0fb6706ddfaf4a5dd Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 28 Mar 2019 14:38:59 -0700 Subject: [PATCH] kernel - Add callout API calls for netgraph7 (2) * Obviously we have to choose rarg/rfunc or qarg/qfunc. From examining the two use cases, select qarg/qfunc. --- sys/sys/callout.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/sys/callout.h b/sys/sys/callout.h index 8106b88575..b477edff03 100644 --- a/sys/sys/callout.h +++ b/sys/sys/callout.h @@ -98,14 +98,18 @@ struct callout { #endif }; +/* + * Legacy access/setting of the function and argument. Used only + * by netgraph7 and ieee80211_dfs.c. DO NOT USE FOR NEW CODE! + */ #ifdef CALLOUT_TYPESTABLE -#define callout_set_arg(cc, _arg) ((cc)->arg = (_arg)) -#define callout_arg(cc) ((cc)->arg) -#define callout_func(cc) ((cc)->func) +#define callout_set_arg(cc, _arg) ((cc)->qarg = (_arg)) +#define callout_arg(cc) ((cc)->qarg) +#define callout_func(cc) ((cc)->qfunc) #else -#define callout_set_arg(cc, _arg) ((cc)->toc.arg = (_arg)) -#define callout_arg(cc) ((cc)->toc.rarg) -#define callout_func(cc) ((cc)->toc.func) +#define callout_set_arg(cc, _arg) ((cc)->toc.qarg = (_arg)) +#define callout_arg(cc) ((cc)->toc.qarg) +#define callout_func(cc) ((cc)->toc.qfunc) #endif #ifndef _SYS_SPINLOCK_H_ #include -- 2.11.4.GIT