diff options
author | 2013-10-30 02:11:32 +0000 | |
---|---|---|
committer | 2013-10-30 02:11:32 +0000 | |
commit | 1c81877c04a2623f3e4b6b41d77c2f44f8c19c4a (patch) | |
tree | f6a7923b3e40386723f2dab71ab69006d24833d5 /sys/kern/kern_task.c | |
parent | Stop using cpp -tradition for fcode; handle the inclusion of a (diff) | |
download | wireguard-openbsd-1c81877c04a2623f3e4b6b41d77c2f44f8c19c4a.tar.xz wireguard-openbsd-1c81877c04a2623f3e4b6b41d77c2f44f8c19c4a.zip |
deprecate taskq_systq() and replace it with extern struct taskq
*const systq defined in task.h
this reduces the cost of using the system taskq and looks less ugly.
requested by and ok kettenis@
Diffstat (limited to 'sys/kern/kern_task.c')
-rw-r--r-- | sys/kern/kern_task.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/kern/kern_task.c b/sys/kern/kern_task.c index 42823a2339a..f04a1b750d1 100644 --- a/sys/kern/kern_task.c +++ b/sys/kern/kern_task.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_task.c,v 1.4 2013/10/29 23:39:02 dlg Exp $ */ +/* $OpenBSD: kern_task.c,v 1.5 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -48,6 +48,8 @@ struct taskq taskq_sys = { TAILQ_HEAD_INITIALIZER(taskq_sys.tq_worklist) }; +struct taskq *const systq = &taskq_sys; + void taskq_init(void); /* called in init_main.c */ void taskq_create_thread(void *); int taskq_next_work(struct taskq *, struct task *); @@ -56,13 +58,7 @@ void taskq_thread(void *); void taskq_init(void) { - kthread_create_deferred(taskq_create_thread, &taskq_sys); -} - -struct taskq * -taskq_systq(void) -{ - return (&taskq_sys); + kthread_create_deferred(taskq_create_thread, systq); } struct taskq * |