xref: /titanic_52/usr/src/uts/sparc/sys/psw.h (revision 0a0e9771ca0211c15f3ac4466b661c145feeb9e4)
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) 1986 by Sun Microsystems, Inc.
24  */
25 
26 #ifndef _SYS_PSW_H
27 #define	_SYS_PSW_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI" /* from SunOS psl.h 1.2 */
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * This file only exists for v7 backwards compatibility.
37  * Kernel code shoulf not include it.
38  */
39 #ifdef _KERNEL
40 #error Kernel include of psw.h
41 #else
42 
43 #include <v7/sys/psr.h>
44 
45 /*
46  * The following defines are obsolete; they exist only for existing
47  * application compatibility.
48  */
49 #define	SR_SMODE	PSR_PS
50 
51 /*
52  * Macros to decode psr.
53  *
54  * XXX - note that AT&T's usage of BASEPRI() is reversed from ours
55  * (i.e. (!BASEPRI(ps)) means that you *are* at the base priority).
56  */
57 #define	BASEPRI(ps)	(((ps) & PSR_PIL) == 0)
58 
59 #endif /* _KERNEL */
60 
61 #ifdef	__cplusplus
62 }
63 #endif
64 
65 #endif	/* _SYS_PSW_H */
66