diff options
author | 2013-12-23 04:20:47 +0000 | |
---|---|---|
committer | 2013-12-23 04:20:47 +0000 | |
commit | 47b16a75264740a5c87e3f10c9f8d89c2a72d3e6 (patch) | |
tree | a00003a08155268bf33cd91677cfdf7d9ff2022a /sys | |
parent | Implement a long-standing desideratum, (diff) | |
download | wireguard-openbsd-47b16a75264740a5c87e3f10c9f8d89c2a72d3e6.tar.xz wireguard-openbsd-47b16a75264740a5c87e3f10c9f8d89c2a72d3e6.zip |
provide a TASK_INITIALIZER() macro.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/task.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/sys/task.h b/sys/sys/task.h index 7319ec37fee..1691aef3650 100644 --- a/sys/sys/task.h +++ b/sys/sys/task.h @@ -1,4 +1,4 @@ -/* $OpenBSD: task.h,v 1.4 2013/10/31 04:33:32 deraadt Exp $ */ +/* $OpenBSD: task.h,v 1.5 2013/12/23 04:20:47 dlg Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -41,6 +41,10 @@ void task_set(struct task *, void (*)(void *, void *), void *, void *); int task_add(struct taskq *, struct task *); int task_del(struct taskq *, struct task *); + +#define TASK_INITIALIZER(_f, _a1, _a2) \ + { { NULL, NULL }, (_f), (_a1), (_a2), 0 } + #endif /* _KERNEL */ #endif /* _SYS_TASKQ_H_ */ |