(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / mach / sys / reboot.h
blob5e49f7fa8712663e851523b6ff1fd7df09424c66
1 /*
2 * Mach Operating System
3 * Copyright (C) 1993,1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
16 * Carnegie Mellon requests users of this software to return to
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
27 * HISTORY
28 * $Log$
29 * Revision 1.4 2002/07/06 06:36:00 aj
30 * * sysdeps/ia64/fpu/e_acos.S: Added text of Intel license.
31 * * sysdeps/ia64/fpu/e_acosf.S: Likewise.
32 * * sysdeps/ia64/fpu/e_acosl.S: Likewise.
33 * * sysdeps/ia64/fpu/e_asin.S: Likewise.
34 * * sysdeps/ia64/fpu/e_asinf.S: Likewise.
35 * * sysdeps/ia64/fpu/e_asinl.S: Likewise.
36 * * sysdeps/ia64/fpu/e_atan2.S: Likewise.
37 * * sysdeps/ia64/fpu/e_atan2f.S: Likewise.
38 * * sysdeps/ia64/fpu/e_cosh.S: Likewise.
39 * * sysdeps/ia64/fpu/e_coshf.S: Likewise.
40 * * sysdeps/ia64/fpu/e_coshl.S: Likewise.
41 * * sysdeps/ia64/fpu/e_exp.S: Likewise.
42 * * sysdeps/ia64/fpu/e_expf.S: Likewise.
43 * * sysdeps/ia64/fpu/e_fmod.S: Likewise.
44 * * sysdeps/ia64/fpu/e_fmodf.S: Likewise.
45 * * sysdeps/ia64/fpu/e_fmodl.S: Likewise.
46 * * sysdeps/ia64/fpu/e_hypot.S: Likewise.
47 * * sysdeps/ia64/fpu/e_hypotf.S: Likewise.
48 * * sysdeps/ia64/fpu/e_hypotl.S: Likewise.
49 * * sysdeps/ia64/fpu/e_log.S: Likewise.
50 * * sysdeps/ia64/fpu/e_logf.S: Likewise.
51 * * sysdeps/ia64/fpu/e_pow.S: Likewise.
52 * * sysdeps/ia64/fpu/e_powf.S: Likewise.
53 * * sysdeps/ia64/fpu/e_powl.S: Likewise.
54 * * sysdeps/ia64/fpu/e_remainder.S: Likewise.
55 * * sysdeps/ia64/fpu/e_remainderf.S: Likewise.
56 * * sysdeps/ia64/fpu/e_remainderl.S: Likewise.
57 * * sysdeps/ia64/fpu/e_scalb.S: Likewise.
58 * * sysdeps/ia64/fpu/e_scalbf.S: Likewise.
59 * * sysdeps/ia64/fpu/e_scalbl.S: Likewise.
60 * * sysdeps/ia64/fpu/e_sinh.S: Likewise.
61 * * sysdeps/ia64/fpu/e_sinhf.S: Likewise.
62 * * sysdeps/ia64/fpu/e_sinhl.S: Likewise.
63 * * sysdeps/ia64/fpu/e_sqrt.S: Likewise.
64 * * sysdeps/ia64/fpu/e_sqrtf.S: Likewise.
65 * * sysdeps/ia64/fpu/e_sqrtl.S: Likewise.
66 * * sysdeps/ia64/fpu/libm_atan2_req.S: Likewise.
67 * * sysdeps/ia64/fpu/libm_error.c: Likewise.
68 * * sysdeps/ia64/fpu/libm_frexp4.S: Likewise.
69 * * sysdeps/ia64/fpu/libm_frexp4f.S: Likewise.
70 * * sysdeps/ia64/fpu/s_frexpl.c: Likewise.
71 * * sysdeps/ia64/fpu/s_ilogb.S: Likewise.
72 * * sysdeps/ia64/fpu/s_ilogbf.S: Likewise.
73 * * sysdeps/ia64/fpu/s_ilogbl.S: Likewise.
74 * * sysdeps/ia64/fpu/s_ldexp.S: Likewise.
75 * * sysdeps/ia64/fpu/s_ldexpf.S: Likewise.
76 * * sysdeps/ia64/fpu/s_ldexpl.S: Likewise.
77 * * sysdeps/ia64/fpu/s_log1p.S: Likewise.
78 * * sysdeps/ia64/fpu/s_log1pf.S: Likewise.
79 * * sysdeps/ia64/fpu/s_log1pl.S: Likewise.
80 * * sysdeps/ia64/fpu/s_logb.S: Likewise.
81 * * sysdeps/ia64/fpu/s_logbf.S: Likewise.
82 * * sysdeps/ia64/fpu/s_logbl.S: Likewise.
83 * * sysdeps/ia64/fpu/s_modf.S: Likewise.
84 * * sysdeps/ia64/fpu/s_modff.S: Likewise.
85 * * sysdeps/ia64/fpu/s_modfl.S: Likewise.
86 * * sysdeps/ia64/fpu/s_nearbyint.S: Likewise.
87 * * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise.
88 * * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise.
89 * * sysdeps/ia64/fpu/s_rint.S: Likewise.
90 * * sysdeps/ia64/fpu/s_rintf.S: Likewise.
91 * * sysdeps/ia64/fpu/s_rintl.S: Likewise.
92 * * sysdeps/ia64/fpu/s_round.S: Likewise.
93 * * sysdeps/ia64/fpu/s_roundf.S: Likewise.
94 * * sysdeps/ia64/fpu/s_roundl.S: Likewise.
95 * * sysdeps/ia64/fpu/s_scalbn.S: Likewise.
96 * * sysdeps/ia64/fpu/s_scalbnf.S: Likewise.
97 * * sysdeps/ia64/fpu/s_scalbnl.S: Likewise.
98 * * sysdeps/ia64/fpu/s_significand.S: Likewise.
99 * * sysdeps/ia64/fpu/s_significandf.S: Likewise.
100 * * sysdeps/ia64/fpu/s_significandl.S: Likewise.
101 * * sysdeps/ia64/fpu/s_tan.S: Likewise.
102 * * sysdeps/ia64/fpu/s_tanf.S: Likewise.
103 * * sysdeps/ia64/fpu/s_tanl.S: Likewise.
104 * * sysdeps/ia64/fpu/s_trunc.S: Likewise.
105 * * sysdeps/ia64/fpu/s_truncf.S: Likewise.
106 * * sysdeps/ia64/fpu/s_truncl.S: Likewise.
107 * * sysdeps/ieee754/dbl-64/doasin.c: changed copyright notice to
108 * reflect IBM donation of math library to FSF
109 * * sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
110 * * sysdeps/ieee754/dbl-64/e_asin.c: Likewise.
111 * * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
112 * * sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
113 * * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
114 * * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
115 * * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise.
116 * * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise.
117 * * sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
118 * * sysdeps/ieee754/dbl-64/mpa.c: Likewise.
119 * * sysdeps/ieee754/dbl-64/mpatan.c: Likewise.
120 * * sysdeps/ieee754/dbl-64/mpatan2.c: Likewise.
121 * * sysdeps/ieee754/dbl-64/mpexp.c: Likewise.
122 * * sysdeps/ieee754/dbl-64/mplog.c: Likewise.
123 * * sysdeps/ieee754/dbl-64/mpsqrt.c: Likewise.
124 * * sysdeps/ieee754/dbl-64/mptan.c: Likewise.
125 * * sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
126 * * sysdeps/ieee754/dbl-64/s_sin.c: Likewise.
127 * * sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
128 * * sysdeps/ieee754/dbl-64/sincos32.c: Likewise.
129 * * sysdeps/ieee754/dbl-64/slowexp.c: Likewise.
130 * * sysdeps/ieee754/dbl-64/slowpow.c: Likewise.
131 * * sysdeps/gnu/netinet/udp.h: Added BSD copying permission notice
132 * * sysdeps/vax/__longjmp.c: Likewise.
133 * * sysdeps/vax/setjmp.c: Likewise.
134 * * libio/filedoalloc.c: Fixed BSD copying permission notice to remove
135 * advertising clause
136 * * sysdeps/vax/htonl.s: Likewise.
137 * * sysdeps/vax/htons.s: Likewise.
138 * * libio/wfiledoalloc.c: Likewise.
139 * * stdlib/random.c: Likewise.
140 * * stdlib/random_r.c: Likewise.
141 * * sysdeps/mach/sys/reboot.h: Likewise.
142 * * inet/getnameinfo.c: Deleted advertising clause from Inner Net License
143 * * sysdeps/posix/getaddrinfo.c: Likewise.
144 * * sunrpc/des_impl.c: Updated license permission notice to Lesser GPL
145 * and corrected pointer to point to the correct license.
147 * Revision 1.3 2000/03/27 04:09:08 roland
148 * 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
150 * * sysdeps/mach/sys/reboot.h: Include <features.h>.
151 * (reboot): Declare it.
153 * Revision 1.2 1998/05/29 10:19:59 drepper
154 * Use __ASSEMBLER__ test macro not ASSEMBLER.
156 * Revision 1.1 1993/08/03 22:25:15 roland
157 * entered into RCS
159 * Revision 2.8 93/03/11 13:46:40 danner
160 * u_long -> u_int.
161 * [93/03/09 danner]
163 * Revision 2.7 92/05/21 17:25:11 jfriedl
164 * Appended 'U' to constants that would otherwise be signed.
165 * [92/05/16 jfriedl]
167 * Revision 2.6 91/06/19 11:59:44 rvb
168 * Second byte of boothowto is flags for "startup" program.
169 * [91/06/18 rvb]
170 * Add ifndef __ASSEMBLER__ so that vax_init.s can include it.
171 * [91/06/11 rvb]
173 * Revision 2.5 91/05/14 17:40:11 mrt
174 * Correcting copyright
176 * Revision 2.4 91/02/05 17:56:48 mrt
177 * Changed to new Mach copyright
178 * [91/02/01 17:49:12 mrt]
180 * Revision 2.3 90/08/27 22:12:56 dbg
181 * Added definitions used by Mach Kernel: RB_DEBUGGER, RB_UNIPROC,
182 * RB_NOBOOTRC, RB_ALTBOOT. Moved RB_KDB to 0x04 (Mach value).
183 * Removed RB_RDONLY, RB_DUMP, RB_NOSYNC.
184 * [90/08/14 dbg]
189 Copyright (C) 1982, 1986, 1988 Regents of the University of California.
190 All rights reserved.
192 Redistribution and use in source and binary forms, with or without
193 modification, are permitted provided that the following conditions
194 are met:
196 1. Redistributions of source code must retain the above copyright
197 notice, this list of conditions and the following disclaimer.
198 2. Redistributions in binary form must reproduce the above copyright
199 notice, this list of conditions and the following disclaimer in the
200 documentation and/or other materials provided with the distribution.
201 4. Neither the name of the University nor the names of its contributors
202 may be used to endorse or promote products derived from this software
203 without specific prior written permission.
205 THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
206 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
207 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
208 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
210 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
211 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
212 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
213 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
214 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
215 SUCH DAMAGE.*/
218 * @(#)reboot.h 7.5 (Berkeley) 6/27/88
221 #ifndef _SYS_REBOOT_H_
222 #define _SYS_REBOOT_H_
224 #include <features.h>
227 * Arguments to reboot system call.
228 * These are converted to switches, and passed to startup program,
229 * and on to init.
231 #define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
233 #define RB_ASKNAME 0x01 /* -a: ask for file name to reboot from */
234 #define RB_SINGLE 0x02 /* -s: reboot to single user only */
235 #define RB_KDB 0x04 /* -d: kernel debugger symbols loaded */
236 #define RB_HALT 0x08 /* -h: enter KDB at bootup */
237 /* for host_reboot(): don't reboot,
238 just halt */
239 #define RB_INITNAME 0x10 /* -i: name given for /etc/init (unused) */
240 #define RB_DFLTROOT 0x20 /* use compiled-in rootdev */
241 #define RB_NOBOOTRC 0x20 /* -b: don't run /etc/rc.boot */
242 #define RB_ALTBOOT 0x40 /* use /boot.old vs /boot */
243 #define RB_UNIPROC 0x80 /* -u: start only one processor */
245 #define RB_SHIFT 8 /* second byte is for ux */
247 #define RB_DEBUGGER 0x1000 /* for host_reboot(): enter kernel
248 debugger from user level */
251 * Constants for converting boot-style device number to type,
252 * adaptor (uba, mba, etc), unit number and partition number.
253 * Type (== major device number) is in the low byte
254 * for backward compatibility. Except for that of the "magic
255 * number", each mask applies to the shifted value.
256 * Format:
257 * (4) (4) (4) (4) (8) (8)
258 * --------------------------------
259 * |MA | AD| CT| UN| PART | TYPE |
260 * --------------------------------
262 #define B_ADAPTORSHIFT 24
263 #define B_ADAPTORMASK 0x0f
264 #define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
265 #define B_CONTROLLERSHIFT 20
266 #define B_CONTROLLERMASK 0xf
267 #define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
268 #define B_UNITSHIFT 16
269 #define B_UNITMASK 0xf
270 #define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
271 #define B_PARTITIONSHIFT 8
272 #define B_PARTITIONMASK 0xff
273 #define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
274 #define B_TYPESHIFT 0
275 #define B_TYPEMASK 0xff
276 #define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
278 #define B_MAGICMASK ((u_int)0xf0000000U)
279 #define B_DEVMAGIC ((u_int)0xa0000000U)
281 #define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
282 (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
283 ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
284 ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
287 #ifdef KERNEL
288 #ifndef __ASSEMBLER__
289 extern int boothowto;
290 #endif /* __ASSEMBLER__ */
291 #endif
293 __BEGIN_DECLS
295 /* Reboot or halt the system. */
296 extern int reboot (int __howto) __THROW;
298 __END_DECLS
301 #endif /* _SYS_REBOOT_H_ */