1b819ceaGordon Ross/*
2b819ceaGordon Ross * CDDL HEADER START
3b819ceaGordon Ross *
4b819ceaGordon Ross * The contents of this file are subject to the terms of the
5b819ceaGordon Ross * Common Development and Distribution License (the "License").
6b819ceaGordon Ross * You may not use this file except in compliance with the License.
7b819ceaGordon Ross *
8b819ceaGordon Ross * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9b819ceaGordon Ross * or http://www.opensolaris.org/os/licensing.
10b819ceaGordon Ross * See the License for the specific language governing permissions
11b819ceaGordon Ross * and limitations under the License.
12b819ceaGordon Ross *
13b819ceaGordon Ross * When distributing Covered Code, include this CDDL HEADER in each
14b819ceaGordon Ross * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15b819ceaGordon Ross * If applicable, add the following below this CDDL HEADER, with the
16b819ceaGordon Ross * fields enclosed by brackets "[]" replaced with your own identifying
17b819ceaGordon Ross * information: Portions Copyright [yyyy] [name of copyright owner]
18b819ceaGordon Ross *
19b819ceaGordon Ross * CDDL HEADER END
20b819ceaGordon Ross */
21b819ceaGordon Ross/*
22b819ceaGordon Ross * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23b819ceaGordon Ross * Use is subject to license terms.
24b819ceaGordon Ross */
25b819ceaGordon Ross/*
26b819ceaGordon Ross * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
27b819ceaGordon Ross */
28b819ceaGordon Ross
29b819ceaGordon Ross#ifndef	_SYS_TASKQ_IMPL_H
30b819ceaGordon Ross#define	_SYS_TASKQ_IMPL_H
31b819ceaGordon Ross
32b819ceaGordon Ross#include <sys/taskq.h>
33b819ceaGordon Ross#include <sys/inttypes.h>
34b819ceaGordon Ross#include <sys/vmem.h>
35b819ceaGordon Ross#include <sys/list.h>
36b819ceaGordon Ross#include <sys/kstat.h>
37b819ceaGordon Ross
38b819ceaGordon Ross#ifdef	__cplusplus
39b819ceaGordon Rossextern "C" {
40b819ceaGordon Ross#endif
41b819ceaGordon Ross
42b819ceaGordon Rosstypedef struct taskq_ent {
43b819ceaGordon Ross	struct taskq_ent	*tqent_next;
44b819ceaGordon Ross	struct taskq_ent	*tqent_prev;
45b819ceaGordon Ross	task_func_t		*tqent_func;
46b819ceaGordon Ross	void			*tqent_arg;
47b819ceaGordon Ross	uintptr_t		tqent_flags;
48b819ceaGordon Ross} taskq_ent_t;
49b819ceaGordon Ross
50b819ceaGordon Ross#define	TQENT_FLAG_PREALLOC	0x1	/* taskq_dispatch_ent used */
51b819ceaGordon Ross
52b819ceaGordon Ross/* Special form of taskq dispatch that uses preallocated entries. */
53b819ceaGordon Rossvoid taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, taskq_ent_t *);
54b819ceaGordon Ross
55b819ceaGordon Ross#ifdef	__cplusplus
56b819ceaGordon Ross}
57b819ceaGordon Ross#endif
58b819ceaGordon Ross
59b819ceaGordon Ross#endif	/* _SYS_TASKQ_IMPL_H */
60