diff options
author | 2014-06-11 08:47:53 +0000 | |
---|---|---|
committer | 2014-06-11 08:47:53 +0000 | |
commit | 53eebcffbe73328a504152429840dbfa9d7c406f (patch) | |
tree | 74738dcdcbc0a5e0110511e9998326502a60ad9e /sys/kern/kern_task.c | |
parent | em(4) receives jumbos by chaining its MCLBYTES sized descriptors (diff) | |
download | wireguard-openbsd-53eebcffbe73328a504152429840dbfa9d7c406f.tar.xz wireguard-openbsd-53eebcffbe73328a504152429840dbfa9d7c406f.zip |
Create system taskq ("systqmp") which runs without the kernel lock;
currently unused.
ok dlg@
manpage improvement and ok jmc@
Diffstat (limited to 'sys/kern/kern_task.c')
-rw-r--r-- | sys/kern/kern_task.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/kern_task.c b/sys/kern/kern_task.c index 2ba2d990ec0..04592ad7f4e 100644 --- a/sys/kern/kern_task.c +++ b/sys/kern/kern_task.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_task.c,v 1.8 2013/12/11 22:39:49 kettenis Exp $ */ +/* $OpenBSD: kern_task.c,v 1.9 2014/06/11 08:47:53 blambert Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -50,7 +50,18 @@ struct taskq taskq_sys = { TAILQ_HEAD_INITIALIZER(taskq_sys.tq_worklist) }; +struct taskq taskq_sys_mp = { + TQ_S_CREATED, + 0, + 1, + 1, + "systqmp", + MUTEX_INITIALIZER(IPL_HIGH), + TAILQ_HEAD_INITIALIZER(taskq_sys_mp.tq_worklist) +}; + struct taskq *const systq = &taskq_sys; +struct taskq *const systqmp = &taskq_sys_mp; void taskq_init(void); /* called in init_main.c */ void taskq_create_thread(void *); @@ -61,6 +72,7 @@ void taskq_init(void) { kthread_create_deferred(taskq_create_thread, systq); + kthread_create_deferred(taskq_create_thread, systqmp); } struct taskq * |