xref: /onnv-gate/usr/src/lib/libpri/common/pri.h (revision 3530:b2d2069032e1)
1*3530Srb144127 /*
2*3530Srb144127  * CDDL HEADER START
3*3530Srb144127  *
4*3530Srb144127  * The contents of this file are subject to the terms of the
5*3530Srb144127  * Common Development and Distribution License (the "License").
6*3530Srb144127  * You may not use this file except in compliance with the License.
7*3530Srb144127  *
8*3530Srb144127  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3530Srb144127  * or http://www.opensolaris.org/os/licensing.
10*3530Srb144127  * See the License for the specific language governing permissions
11*3530Srb144127  * and limitations under the License.
12*3530Srb144127  *
13*3530Srb144127  * When distributing Covered Code, include this CDDL HEADER in each
14*3530Srb144127  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3530Srb144127  * If applicable, add the following below this CDDL HEADER, with the
16*3530Srb144127  * fields enclosed by brackets "[]" replaced with your own identifying
17*3530Srb144127  * information: Portions Copyright [yyyy] [name of copyright owner]
18*3530Srb144127  *
19*3530Srb144127  * CDDL HEADER END
20*3530Srb144127  */
21*3530Srb144127 /*
22*3530Srb144127  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*3530Srb144127  * Use is subject to license terms.
24*3530Srb144127  */
25*3530Srb144127 
26*3530Srb144127 #ifndef	_PRI_H
27*3530Srb144127 #define	_PRI_H
28*3530Srb144127 
29*3530Srb144127 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*3530Srb144127 
31*3530Srb144127 #include <stdlib.h>
32*3530Srb144127 #include <sys/types.h>
33*3530Srb144127 
34*3530Srb144127 #ifdef	__cplusplus
35*3530Srb144127 extern "C" {
36*3530Srb144127 #endif
37*3530Srb144127 
38*3530Srb144127 #define		PRI_GET		0
39*3530Srb144127 #define		PRI_WAITGET	1
40*3530Srb144127 #define		DS_PRI_DRIVER	"/devices/pseudo/ds_pri@0:ds_pri"
41*3530Srb144127 
42*3530Srb144127 extern int pri_init(void);
43*3530Srb144127 extern void pri_fini(void);
44*3530Srb144127 extern ssize_t pri_get(uint8_t wait, uint64_t *token, uint64_t **buf,
45*3530Srb144127 		void *(*allocp)(size_t), void (*freep)(void *, size_t));
46*3530Srb144127 
47*3530Srb144127 #ifdef	__cplusplus
48*3530Srb144127 }
49*3530Srb144127 #endif
50*3530Srb144127 
51*3530Srb144127 #endif	/* _PRI_H */
52