]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/sys/types.h
2f61d0065afb15007eae8418d828972c58f68159
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
28 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez
29 * Import of Mac OS X kernel (~semeria)
31 * Revision 1.1.1.1 1998/03/07 02:25:59 wsanchez
32 * Import of OSF Mach kernel (~mburg)
34 * Revision 1.1.10.3 1996/01/09 19:23:12 devrcs
35 * Change time_t typedef from "unsigned int" to "int" to
36 * match the server and what it has historically been.
37 * Added more shorthand definitions for unsigned typedefs.
38 * Made conditional on ASSEMBLER not being defined.
39 * [1995/12/01 20:39:08 jfraser]
41 * Merged '64-bit safe' changes from DEC alpha port.
42 * [1995/11/21 18:10:35 jfraser]
44 * Revision 1.1.10.2 1995/01/06 19:57:26 devrcs
45 * mk6 CR668 - 1.3b26 merge
46 * add shorthand defs for unsigned typedefs
48 * paranoid bit masking, 64bit cleanup, add NBBY
49 * [1994/10/14 03:43:58 dwm]
51 * Revision 1.1.10.1 1994/09/23 03:13:36 ezf
52 * change marker to not FREE
53 * [1994/09/22 21:59:04 ezf]
55 * Revision 1.1.3.2 1993/06/03 00:18:19 jeffc
56 * Added to OSF/1 R1.3 from NMK15.0.
57 * [1993/06/02 21:31:08 jeffc]
59 * Revision 1.1 1992/09/30 02:37:03 robert
66 * Revision 2.6 91/05/14 17:40:39 mrt
67 * Correcting copyright
69 * Revision 2.5 91/02/05 17:57:07 mrt
70 * Changed to new Mach copyright
71 * [91/02/01 17:49:41 mrt]
73 * Revision 2.4 90/08/27 22:13:03 dbg
80 * Mach Operating System
81 * Copyright (c) 1991,1990 Carnegie Mellon University
82 * All Rights Reserved.
84 * Permission to use, copy, modify and distribute this software and its
85 * documentation is hereby granted, provided that both the copyright
86 * notice and this permission notice appear in all copies of the
87 * software, derivative works or modified versions, and any portions
88 * thereof, and that both notices appear in supporting documentation.
90 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
91 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
92 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
94 * Carnegie Mellon requests users of this software to return to
96 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
97 * School of Computer Science
98 * Carnegie Mellon University
99 * Pittsburgh PA 15213-3890
101 * any improvements or extensions that they make and grant Carnegie Mellon rights
102 * to redistribute these changes.
106 #ifndef _SYS_TYPES_H_
107 #define _SYS_TYPES_H_
112 * Common type definitions that lots of old files seem to want.
115 typedef unsigned char u_char
; /* unsigned char */
116 typedef unsigned short u_short
; /* unsigned short */
117 typedef unsigned int u_int
; /* unsigned int */
118 typedef unsigned long u_long
; /* unsigned long */
120 typedef struct _quad_
{
121 unsigned int val
[2]; /* 2 32-bit values make... */
122 } quad
; /* an 8-byte item */
124 typedef char * caddr_t
; /* address of a (signed) char */
126 typedef int time_t; /* a signed 32 */
127 typedef unsigned int daddr_t
; /* an unsigned 32 */
128 #if 0 /* off_t should be 64-bit ! */
129 typedef unsigned int off_t
; /* another unsigned 32 */
131 typedef unsigned short dev_t
; /* another unsigned short */
132 #define NODEV ((dev_t)-1) /* and a null value for it */
134 #define major(i) (((i) >> 8) & 0xFF)
135 #define minor(i) ((i) & 0xFF)
136 #define makedev(i,j) ((((i) & 0xFF) << 8) | ((j) & 0xFF))
141 #define NULL ((void *) 0) /* the null pointer */
145 * Shorthand type definitions for unsigned storage classes
147 typedef unsigned char uchar_t
;
148 typedef unsigned short ushort_t
;
149 typedef unsigned int uint_t
;
150 typedef unsigned long ulong_t
;
151 typedef volatile unsigned char vuchar_t
;
152 typedef volatile unsigned short vushort_t
;
153 typedef volatile unsigned int vuint_t
;
154 typedef volatile unsigned long vulong_t
;
157 * Shorthand type definitions for unsigned storage classes
159 typedef uchar_t uchar
;
160 typedef ushort_t ushort
;
162 typedef ulong_t ulong
;
164 #endif /* !ASSEMBLER */
166 #endif /* _SYS_TYPES_H_ */