/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NSC_THREAD_H
#define _NSC_THREAD_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
* A simple way to marshal kthreads into sets for use by nsctl / nskern
* clients. The ns threads are created in user land by nskernd, and
* then call into the nskern kernel module for allocation into sets.
*/
struct nsthread;
struct nstset;
#ifndef _BLIND_T
#define _BLIND_T
typedef void * blind_t;
#endif /* _BLIND_T */
/*
* Queue stuff that should really be in the DDI.
*/
typedef struct nst_q {
} nst_q_t;
/*
* Per thread data structure.
*/
typedef struct nsthread {
/*
* Everything past this point is cleared when the thread is
* initialised for (re)use.
*/
} nsthread_t;
/*
* Flags for nst_init
*/
/*
* Thread state flags
*/
/*
* Thread set.
*/
typedef struct nstset {
} nstset_t;
/*
* Set state flags
*/
/*
* General defines
*/
/*
* Function prototypes
*/
int nst_add_thread(nstset_t *, int);
int nst_del_thread(nstset_t *, int);
void nst_destroy(nstset_t *);
int nst_nthread(nstset_t *);
int nst_startup(void);
void nst_shutdown(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _NSC_THREAD_H */