]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/sys/types.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
34 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez
35 * Import of Mac OS X kernel (~semeria)
37 * Revision 1.1.1.1 1998/03/07 02:25:59 wsanchez
38 * Import of OSF Mach kernel (~mburg)
40 * Revision 1.1.10.3 1996/01/09 19:23:12 devrcs
41 * Change time_t typedef from "unsigned int" to "int" to
42 * match the server and what it has historically been.
43 * Added more shorthand definitions for unsigned typedefs.
44 * Made conditional on ASSEMBLER not being defined.
45 * [1995/12/01 20:39:08 jfraser]
47 * Merged '64-bit safe' changes from DEC alpha port.
48 * [1995/11/21 18:10:35 jfraser]
50 * Revision 1.1.10.2 1995/01/06 19:57:26 devrcs
51 * mk6 CR668 - 1.3b26 merge
52 * add shorthand defs for unsigned typedefs
54 * paranoid bit masking, 64bit cleanup, add NBBY
55 * [1994/10/14 03:43:58 dwm]
57 * Revision 1.1.10.1 1994/09/23 03:13:36 ezf
58 * change marker to not FREE
59 * [1994/09/22 21:59:04 ezf]
61 * Revision 1.1.3.2 1993/06/03 00:18:19 jeffc
62 * Added to OSF/1 R1.3 from NMK15.0.
63 * [1993/06/02 21:31:08 jeffc]
65 * Revision 1.1 1992/09/30 02:37:03 robert
72 * Revision 2.6 91/05/14 17:40:39 mrt
73 * Correcting copyright
75 * Revision 2.5 91/02/05 17:57:07 mrt
76 * Changed to new Mach copyright
77 * [91/02/01 17:49:41 mrt]
79 * Revision 2.4 90/08/27 22:13:03 dbg
86 * Mach Operating System
87 * Copyright (c) 1991,1990 Carnegie Mellon University
88 * All Rights Reserved.
90 * Permission to use, copy, modify and distribute this software and its
91 * documentation is hereby granted, provided that both the copyright
92 * notice and this permission notice appear in all copies of the
93 * software, derivative works or modified versions, and any portions
94 * thereof, and that both notices appear in supporting documentation.
96 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
97 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
98 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
100 * Carnegie Mellon requests users of this software to return to
102 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
103 * School of Computer Science
104 * Carnegie Mellon University
105 * Pittsburgh PA 15213-3890
107 * any improvements or extensions that they make and grant Carnegie Mellon rights
108 * to redistribute these changes.
112 #ifndef _SYS_TYPES_H_
113 #define _SYS_TYPES_H_
118 * Common type definitions that lots of old files seem to want.
121 typedef unsigned char u_char
; /* unsigned char */
122 typedef unsigned short u_short
; /* unsigned short */
123 typedef unsigned int u_int
; /* unsigned int */
124 typedef unsigned long u_long
; /* unsigned long */
126 typedef struct _quad_
{
127 unsigned int val
[2]; /* 2 32-bit values make... */
128 } quad
; /* an 8-byte item */
130 typedef char * caddr_t
; /* address of a (signed) char */
132 typedef int time_t; /* a signed 32 */
133 typedef unsigned int daddr_t
; /* an unsigned 32 */
134 #if 0 /* off_t should be 64-bit ! */
135 typedef unsigned int off_t
; /* another unsigned 32 */
137 typedef unsigned short dev_t
; /* another unsigned short */
138 #define NODEV ((dev_t)-1) /* and a null value for it */
140 #define major(i) (((i) >> 8) & 0xFF)
141 #define minor(i) ((i) & 0xFF)
142 #define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
147 #define NULL ((void *) 0) /* the null pointer */
151 * Shorthand type definitions for unsigned storage classes
153 typedef unsigned char uchar_t
;
154 typedef unsigned short ushort_t
;
155 typedef unsigned int uint_t
;
156 typedef unsigned long ulong_t
;
157 typedef volatile unsigned char vuchar_t
;
158 typedef volatile unsigned short vushort_t
;
159 typedef volatile unsigned int vuint_t
;
160 typedef volatile unsigned long vulong_t
;
163 * Shorthand type definitions for unsigned storage classes
165 typedef uchar_t uchar
;
166 typedef ushort_t ushort
;
168 typedef ulong_t ulong
;
170 #endif /* !ASSEMBLER */
172 #endif /* _SYS_TYPES_H_ */