]> git.saurik.com Git - apple/xnu.git/blob - osfmk/device/device_types.defs
9c7dd51833a5aedc10da8df60e39d6b2307c3d0a
[apple/xnu.git] / osfmk / device / device_types.defs
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 * Mach Operating System
27 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
28 * All Rights Reserved.
29 *
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
35 *
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
39 *
40 * Carnegie Mellon requests users of this software to return to
41 *
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
46 *
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
49 */
50 /*
51 */
52 /*
53 * Author: David B. Golub, Carnegie Mellon University
54 * Date: 3/89
55 *
56 * Common definitions for device interface types.
57 */
58
59 #ifndef _DEVICE_DEVICE_TYPES_DEFS_
60 #define _DEVICE_DEVICE_TYPES_DEFS_
61
62 /*
63 * Basic types
64 */
65
66 #include <mach/std_types.defs>
67 #include <mach/mach_types.defs>
68
69 type recnum_t = unsigned32;
70 type dev_mode_t = unsigned32;
71 type dev_flavor_t = unsigned32;
72 type dev_name_t = c_string[*:128];
73 type dev_status_t = array[*:1024] of int;
74 type io_buf_len_t = integer_t;
75 type io_buf_ptr_t = ^array[] of MACH_MSG_TYPE_INTEGER_8;
76 type io_buf_ptr_inband_t= array[*:128] of char;
77 type filter_t = short;
78 type filter_array_t = array[*:64] of filter_t;
79
80 type device_t = mach_port_t
81 ctype: mach_port_t
82 #if KERNEL_SERVER
83 intran: device_t dev_port_lookup(mach_port_t)
84 outtran: mach_port_t convert_device_to_port(device_t)
85 destructor: device_deallocate(device_t)
86 #endif /* KERNEL_SERVER */
87 ;
88
89 type io_done_queue_t = mach_port_t
90 ctype: mach_port_t
91 #if KERNEL_SERVER
92 intran: io_done_queue_t io_done_queue_port_lookup(mach_port_t)
93 outtran: mach_port_t convert_io_done_queue_to_port(io_done_queue_t)
94 #endif KERNEL_SERVER
95 ;
96
97 import <device/device_types.h>;
98
99 #endif /* _DEVICE_DEVICE_TYPES_DEFS_ */