]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kern/macro_help.h
xnu-123.5.tar.gz
[apple/xnu.git] / osfmk / kern / macro_help.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * @OSF_COPYRIGHT@
24 */
25/*
26 * HISTORY
27 *
28 * Revision 1.1.1.1 1998/09/22 21:05:34 wsanchez
29 * Import of Mac OS X kernel (~semeria)
30 *
31 * Revision 1.1.1.1 1998/03/07 02:25:55 wsanchez
32 * Import of OSF Mach kernel (~mburg)
33 *
34 * Revision 1.1.6.1 1994/09/23 02:23:07 ezf
35 * change marker to not FREE
36 * [1994/09/22 21:34:48 ezf]
37 *
38 * Revision 1.1.2.3 1993/06/07 22:14:06 jeffc
39 * CR9176 - ANSI C violations: trailing tokens on CPP
40 * directives, extra semicolons after decl_ ..., asm keywords
41 * [1993/06/07 19:06:13 jeffc]
42 *
43 * Revision 1.1.2.2 1993/06/02 23:39:03 jeffc
44 * Added to OSF/1 R1.3 from NMK15.0.
45 * [1993/06/02 21:13:38 jeffc]
46 *
47 * Revision 1.1 1992/09/30 02:29:53 robert
48 * Initial revision
49 *
50 * $EndLog$
51 */
52/* CMU_HIST */
53/*
54 * Revision 2.3 91/05/14 16:44:49 mrt
55 * Correcting copyright
56 *
57 * Revision 2.2 91/02/05 17:28:09 mrt
58 * Changed to new Mach copyright
59 * [91/02/01 16:15:31 mrt]
60 *
61 * Revision 2.1 89/08/03 15:53:45 rwd
62 * Created.
63 *
64 * Revision 2.2 88/10/18 03:36:20 mwyoung
65 * Added a form of return that can be used within macros that
66 * does not result in "statement not reached" noise.
67 * [88/10/17 mwyoung]
68 *
69 * Add MACRO_BEGIN, MACRO_END.
70 * [88/10/11 mwyoung]
71 *
72 * Created.
73 * [88/10/08 mwyoung]
74 *
75 */
76/* CMU_ENDHIST */
77/*
78 * Mach Operating System
79 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
80 * All Rights Reserved.
81 *
82 * Permission to use, copy, modify and distribute this software and its
83 * documentation is hereby granted, provided that both the copyright
84 * notice and this permission notice appear in all copies of the
85 * software, derivative works or modified versions, and any portions
86 * thereof, and that both notices appear in supporting documentation.
87 *
88 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
89 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
90 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
91 *
92 * Carnegie Mellon requests users of this software to return to
93 *
94 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
95 * School of Computer Science
96 * Carnegie Mellon University
97 * Pittsburgh PA 15213-3890
98 *
99 * any improvements or extensions that they make and grant Carnegie Mellon
100 * the rights to redistribute these changes.
101 */
102/*
103 */
104/*
105 * File: kern/macro_help.h
106 *
107 * Provide help in making lint-free macro routines
108 *
109 */
110
111#ifndef _KERN_MACRO_HELP_H_
112#define _KERN_MACRO_HELP_H_
113
114#include <mach/boolean.h>
115
116#ifdef lint
117boolean_t NEVER;
118boolean_t ALWAYS;
119#else /* lint */
120#define NEVER FALSE
121#define ALWAYS TRUE
122#endif /* lint */
123
124#define MACRO_BEGIN do {
125#define MACRO_END } while (NEVER)
126
127#define MACRO_RETURN if (ALWAYS) return
128
129#endif /* _KERN_MACRO_HELP_H_ */