taskqueue.h (154333) | taskqueue.h (177253) |
---|---|
1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/sys/taskqueue.h 154333 2006-01-14 01:55:24Z scottl $ | 26 * $FreeBSD: head/sys/sys/taskqueue.h 177253 2008-03-16 10:58:09Z rwatson $ |
27 */ 28 29#ifndef _SYS_TASKQUEUE_H_ 30#define _SYS_TASKQUEUE_H_ 31 32#ifndef _KERNEL 33#error "no user-servicable parts inside" 34#endif --- 57 unchanged lines hidden (view full) --- 92taskqueue_define_##name(void *arg) \ 93{ \ 94 taskqueue_##name = \ 95 taskqueue_create(#name, M_NOWAIT, (enqueue), (context)); \ 96 init; \ 97} \ 98 \ 99SYSINIT(taskqueue_##name, SI_SUB_CONFIGURE, SI_ORDER_SECOND, \ | 27 */ 28 29#ifndef _SYS_TASKQUEUE_H_ 30#define _SYS_TASKQUEUE_H_ 31 32#ifndef _KERNEL 33#error "no user-servicable parts inside" 34#endif --- 57 unchanged lines hidden (view full) --- 92taskqueue_define_##name(void *arg) \ 93{ \ 94 taskqueue_##name = \ 95 taskqueue_create(#name, M_NOWAIT, (enqueue), (context)); \ 96 init; \ 97} \ 98 \ 99SYSINIT(taskqueue_##name, SI_SUB_CONFIGURE, SI_ORDER_SECOND, \ |
100 taskqueue_define_##name, NULL) \ | 100 taskqueue_define_##name, NULL); \ |
101 \ 102struct __hack 103#define TASKQUEUE_DEFINE_THREAD(name) \ 104TASKQUEUE_DEFINE(name, taskqueue_thread_enqueue, &taskqueue_##name, \ 105 taskqueue_start_threads(&taskqueue_##name, 1, PWAIT, \ 106 "%s taskq", #name)) 107 108/* --- 8 unchanged lines hidden (view full) --- 117{ \ 118 taskqueue_##name = \ 119 taskqueue_create_fast(#name, M_NOWAIT, (enqueue), \ 120 (context)); \ 121 init; \ 122} \ 123 \ 124SYSINIT(taskqueue_##name, SI_SUB_CONFIGURE, SI_ORDER_SECOND, \ | 101 \ 102struct __hack 103#define TASKQUEUE_DEFINE_THREAD(name) \ 104TASKQUEUE_DEFINE(name, taskqueue_thread_enqueue, &taskqueue_##name, \ 105 taskqueue_start_threads(&taskqueue_##name, 1, PWAIT, \ 106 "%s taskq", #name)) 107 108/* --- 8 unchanged lines hidden (view full) --- 117{ \ 118 taskqueue_##name = \ 119 taskqueue_create_fast(#name, M_NOWAIT, (enqueue), \ 120 (context)); \ 121 init; \ 122} \ 123 \ 124SYSINIT(taskqueue_##name, SI_SUB_CONFIGURE, SI_ORDER_SECOND, \ |
125 taskqueue_define_##name, NULL) \ | 125 taskqueue_define_##name, NULL); \ |
126 \ 127struct __hack 128#define TASKQUEUE_FAST_DEFINE_THREAD(name) \ 129TASKQUEUE_FAST_DEFINE(name, taskqueue_thread_enqueue, \ 130 &taskqueue_##name, taskqueue_start_threads(&taskqueue_##name \ 131 1, PWAIT, "%s taskq", #name)) 132 133/* --- 26 unchanged lines hidden --- | 126 \ 127struct __hack 128#define TASKQUEUE_FAST_DEFINE_THREAD(name) \ 129TASKQUEUE_FAST_DEFINE(name, taskqueue_thread_enqueue, \ 130 &taskqueue_##name, taskqueue_start_threads(&taskqueue_##name \ 131 1, PWAIT, "%s taskq", #name)) 132 133/* --- 26 unchanged lines hidden --- |