xref: /illumos-gate/usr/src/lib/libfakekernel/common/sys/t_lock.h (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1991-1998 by Sun Microsystems, Inc.
24  * All rights reserved.
25  *
26  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
27  */
28 
29 /*
30  * t_lock.h:	Prototypes for disp_locks, plus include files
31  *		that describe the interfaces to kernel synch.
32  *		objects.
33  */
34 
35 #ifndef _SYS_T_LOCK_H
36 #define	_SYS_T_LOCK_H
37 
38 /* these two are real */
39 #include <sys/machlock.h>
40 #include <sys/param.h>
41 
42 /* the rest are fake */
43 #include <sys/mutex.h>
44 #include <sys/rwlock.h>
45 #include <sys/semaphore.h>
46 #include <sys/condvar.h>
47 
48 /*
49  * The real sys/semaphore.h pulls in sys/thread and some headers
50  * using sys/t_lock.h rely on that, so let's pull it in here too.
51  * Note that sys/thread.h includes sys/t_lock.h too (a cycle) but
52  * that's OK thanks to the multi-include guards.
53  */
54 #if defined(_KERNEL) || defined(_FAKE_KERNEL)
55 #include <sys/thread.h>
56 #endif
57 
58 #endif	/* _SYS_T_LOCK_H */
59