xref: /NextBSD/sys/sys/mach/macro_help.h (revision 33da5adc555b3bc29986eeadca03829e4ad06b1e)
1 /*
2  * Copyright 1991-1998 by Open Software Foundation, Inc.
3  *              All Rights Reserved
4  *
5  * Permission to use, copy, modify, and distribute this software and
6  * its documentation for any purpose and without fee is hereby granted,
7  * provided that the above copyright notice appears in all copies and
8  * that both the copyright notice and this permission notice appear in
9  * supporting documentation.
10  *
11  * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
12  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13  * FOR A PARTICULAR PURPOSE.
14  *
15  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
16  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
18  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
19  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  */
21 /*
22  * MkLinux
23  */
24 /* CMU_HIST */
25 /*
26  * Revision 2.3  91/05/14  16:44:49  mrt
27  * 	Correcting copyright
28  *
29  * Revision 2.2  91/02/05  17:28:09  mrt
30  * 	Changed to new Mach copyright
31  * 	[91/02/01  16:15:31  mrt]
32  *
33  * Revision 2.1  89/08/03  15:53:45  rwd
34  * Created.
35  *
36  * Revision 2.2  88/10/18  03:36:20  mwyoung
37  * 	Added a form of return that can be used within macros that
38  * 	does not result in "statement not reached" noise.
39  * 	[88/10/17            mwyoung]
40  *
41  * 	Add MACRO_BEGIN, MACRO_END.
42  * 	[88/10/11            mwyoung]
43  *
44  * 	Created.
45  * 	[88/10/08            mwyoung]
46  *
47  */
48 /* CMU_ENDHIST */
49 /*
50  * Mach Operating System
51  * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
52  * All Rights Reserved.
53  *
54  * Permission to use, copy, modify and distribute this software and its
55  * documentation is hereby granted, provided that both the copyright
56  * notice and this permission notice appear in all copies of the
57  * software, derivative works or modified versions, and any portions
58  * thereof, and that both notices appear in supporting documentation.
59  *
60  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
61  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
62  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
63  *
64  * Carnegie Mellon requests users of this software to return to
65  *
66  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
67  *  School of Computer Science
68  *  Carnegie Mellon University
69  *  Pittsburgh PA 15213-3890
70  *
71  * any improvements or extensions that they make and grant Carnegie Mellon
72  * the rights to redistribute these changes.
73  */
74 /*
75  */
76 /*
77  *	File:	kern/macro_help.h
78  *
79  *	Provide help in making lint-free macro routines
80  *
81  */
82 
83 #ifndef	_KERN_MACRO_HELP_H_
84 #define	_KERN_MACRO_HELP_H_
85 
86 #ifdef	lint
87 boolean_t	NEVER;
88 boolean_t	ALWAYS;
89 #else	/* lint */
90 #define		NEVER		FALSE
91 #define		ALWAYS		TRUE
92 #endif	/* lint */
93 
94 #define		MACRO_BEGIN	do {
95 #define		MACRO_END	} while (NEVER)
96 
97 #define		MACRO_RETURN	if (ALWAYS) return
98 
99 #endif	/* _KERN_MACRO_HELP_H_ */
100