taskq.h revision 2e0c549eb612aef12ce21941172e3abe2e62ba85
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_TASKQ_H
#define _SYS_TASKQ_H
#ifdef __cplusplus
extern "C" {
#endif
#define TASKQ_NAMELEN 31
typedef void (task_func_t)(void *);
/*
* Public flags for taskq_create(): bit range 0-15
*/
/*
* Flags for taskq_dispatch. TQ_SLEEP/TQ_NOSLEEP should be same as
*/
#ifdef _KERNEL
extern taskq_t *system_taskq;
extern void taskq_init(void);
extern void taskq_mp_init(void);
int, uint_t);
extern void nulltask(void *);
extern void taskq_destroy(taskq_t *);
extern void taskq_wait(taskq_t *);
extern void taskq_suspend(taskq_t *);
extern int taskq_suspended(taskq_t *);
extern void taskq_resume(taskq_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_TASKQ_H */