Sync usage with man page.
[netbsd-mini2440.git] / sys / compat / mach / mach_types.h
blob452be06c532bffdf63558b527db85cac43cb6d35
1 /* $NetBSD: mach_types.h,v 1.23 2005/12/11 12:20:20 christos Exp $ */
3 /*-
4 * Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas and Emmanuel Dreyfus.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _MACH_TYPES_H_
33 #define _MACH_TYPES_H_
35 typedef int mach_port_t;
36 typedef int mach_port_name_t;
37 typedef int mach_port_type_t;
38 typedef register_t mach_kern_return_t;
39 typedef int mach_clock_res_t;
40 typedef int mach_clock_id_t;
41 typedef int mach_boolean_t;
42 typedef int mach_sleep_type_t;
43 typedef int mach_absolute_time_t;
44 typedef int mach_integer_t;
45 typedef int mach_cpu_type_t;
46 typedef int mach_cpu_subtype_t;
47 typedef int mach_port_right_t;
48 typedef register_t mach_vm_address_t;
49 typedef int mach_vm_inherit_t;
50 typedef int mach_vm_prot_t;
51 typedef int mach_thread_state_flavor_t;
52 typedef unsigned int mach_natural_t;
53 typedef unsigned long mach_vm_size_t;
54 typedef uint64_t mach_memory_object_size_t;
55 typedef unsigned long mach_vm_offset_t;
56 typedef uint64_t mach_memory_object_offset_t;
57 typedef int mach_vm_region_flavor_t;
58 typedef int mach_vm_behavior_t;
59 typedef int mach_vm_sync_t;
60 typedef int mach_exception_type_t;
61 typedef int mach_exception_behavior_t;
62 typedef unsigned int mach_exception_mask_t;
63 typedef int mach_port_flavor_t;
64 typedef mach_natural_t mach_port_seqno_t;
65 typedef mach_natural_t mach_port_mscount_t;
66 typedef mach_natural_t mach_port_msgcount_t;
67 typedef mach_natural_t mach_port_rights_t;
68 typedef mach_natural_t mach_task_flavor_t;
69 typedef mach_natural_t mach_thread_flavor_t;
70 typedef int mach_policy_t;
71 typedef int mach_vm_machine_attribute_val_t;
72 typedef unsigned int mach_vm_machine_attribute_t;
73 typedef mach_natural_t mach_port_urefs_t;
74 typedef int mach_port_delta_t;
78 * This is called cproc_t in Mach (cthread_t in Darwin). It is a pointer to
79 * a struct cproc (struct cthread in Darwin), which is stored in userland and
80 * seems to be opaque to the kernel. The kernel just has to store and restore
81 * it with cthread_self() (pthread_self() in Darwin) and _cthread_set_self()
82 * (_pthread_set_self() in Darwin).
84 typedef void *mach_cproc_t;
86 typedef struct mach_timebase_info {
87 u_int32_t numer;
88 u_int32_t denom;
89 } *mach_timebase_info_t;
91 typedef struct {
92 u_int8_t mig_vers;
93 u_int8_t if_vers;
94 u_int8_t reserved1;
95 u_int8_t mig_encoding;
96 u_int8_t int_rep;
97 u_int8_t char_rep;
98 u_int8_t float_rep;
99 u_int8_t reserved2;
100 } mach_ndr_record_t;
102 typedef struct {
103 mach_integer_t seconds;
104 mach_integer_t microseconds;
105 } mach_time_value_t;
107 #ifdef DEBUG_MACH
108 #define DPRINTF(a) printf a
109 #else
110 #define DPRINTF(a)
111 #endif /* DEBUG_MACH */
113 #endif /* !_MACH_TYPES_H_ */