kernel - Add callout API calls for netgraph7
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 28 Mar 2019 19:46:54 +0000 (12:46 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 28 Mar 2019 19:46:54 +0000 (12:46 -0700)
* Add a few more API calls to callout to support
  netgraph7's abuse of the mechanism.

Reported-by: swildner
sys/sys/callout.h

index b234082..8106b88 100644 (file)
@@ -99,9 +99,13 @@ struct callout {
 };
 
 #ifdef CALLOUT_TYPESTABLE
-#define callout_arg(cc)        ((cc)->arg)
+#define callout_set_arg(cc, _arg)      ((cc)->arg = (_arg))
+#define callout_arg(cc)                        ((cc)->arg)
+#define callout_func(cc)               ((cc)->func)
 #else
-#define callout_arg(cc)        ((cc)->toc.rarg)
+#define callout_set_arg(cc, _arg)      ((cc)->toc.arg = (_arg))
+#define callout_arg(cc)                        ((cc)->toc.rarg)
+#define callout_func(cc)               ((cc)->toc.func)
 #endif
 #ifndef _SYS_SPINLOCK_H_
 #include <sys/spinlock.h>