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