xref: /titanic_41/usr/src/uts/common/avs/ns/solaris/nskernd.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _NSKERND_H
27 #define	_NSKERND_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #include <sys/nsctl/nsc_ioctl.h>	/* for struct nskernd */
34 
35 enum {
36 	NSKERND_START,		/* Start of daemon processing */
37 	NSKERND_STOP,		/* Stop daemon */
38 	NSKERND_WAIT,		/* Wait for next command */
39 	NSKERND_BSIZE,		/* Get size in blocks of device */
40 	NSKERND_NEWLWP,		/* Create a new lwp */
41 	NSKERND_LOCK,		/* Obtain an inter-node lock */
42 	NSKERND_IIBITMAP	/* mark an II bitmap as failed */
43 };
44 
45 /*
46  * The following #define is used by the ii kernel to write any
47  * flags information into the dscfg file when the bitmap volume
48  * fails.
49  */
50 #define	NSKERN_II_BMP_OPTION "flags"
51 
52 #ifdef _KERNEL
53 
54 extern void *proc_nskernd;
55 extern int nskernd_iscluster;
56 
57 extern void nskernd_init(void);
58 extern void nskernd_deinit(void);
59 extern void nskernd_stop(void);
60 extern int nskernd_get(struct nskernd *);
61 
62 extern void nsc_lockchild(uint64_t, uint64_t);
63 extern void nsc_runlwp(uint64_t);
64 
65 #endif
66 
67 #ifdef	__cplusplus
68 }
69 #endif
70 
71 #endif /* _NSKERND_H */
72