Chameleon

Chameleon Svn Source Tree

Root/tags/2.3/i386/include/sys/kernel_types.h

Source at commit 2862 created 7 years 24 days ago.
By ifabio, Tag 2.3 release, bump svn to 2.4
1/*
2 * Copyright (c) 2004-2010 Apple Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
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.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
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.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28
29#ifndef _KERN_SYS_KERNELTYPES_H_
30#define _KERN_SYS_KERNELTYPES_H_
31
32#include <sys/cdefs.h>
33#include <sys/types.h>
34#include <stdint.h>
35
36#ifdef BSD_BUILD
37/* Macros(?) to clear/set/test flags. */
38#defineSET(t, f)(t) |= (f)
39#defineCLR(t, f)(t) &= ~(f)
40#defineISSET(t, f)((t) & (f))
41#endif
42
43
44typedef int errno_t;
45typedef int64_t daddr64_t;
46
47#ifndef BSD_BUILD
48struct buf;
49typedef struct buf * buf_t;
50
51struct file;
52typedef struct file * file_t;
53
54#ifndef __LP64__
55struct ucred;
56typedef struct ucred * ucred_t;
57#endif
58
59struct mount;
60typedef struct mount * mount_t;
61
62struct vnode;
63typedef struct vnode * vnode_t;
64
65struct proc;
66typedef struct proc * proc_t;
67
68struct uio;
69typedef struct uio * uio_t;
70
71struct vfs_context;
72typedef struct vfs_context * vfs_context_t;
73
74struct vfstable;
75typedef struct vfstable * vfstable_t;
76
77struct __ifnet;
78struct __mbuf;
79struct __pkthdr;
80struct __socket;
81struct __sockopt;
82struct __ifaddr;
83struct __ifmultiaddr;
84struct __ifnet_filter;
85struct __rtentry;
86struct __if_clone;
87
88typedefstruct __ifnet*ifnet_t;
89typedefstruct __mbuf*mbuf_t;
90typedefstruct __pkthdr*pkthdr_t;
91typedefstruct __socket*socket_t;
92typedef struct __sockopt*sockopt_t;
93typedef struct __ifaddr*ifaddr_t;
94typedef struct __ifmultiaddr*ifmultiaddr_t;
95typedef struct __ifnet_filter*interface_filter_t;
96typedef struct __rtentry*route_t;
97typedef struct __if_clone*if_clone_t;
98
99#else /* BSD_BUILD */
100
101typedef struct buf * buf_t;
102typedef struct file * file_t;
103#ifndef __LP64__
104typedef struct ucred * ucred_t;
105#endif
106typedef struct mount * mount_t;
107typedef struct vnode * vnode_t;
108typedef struct proc * proc_t;
109typedef struct uio * uio_t;
110typedef struct user_iovec * user_iovec_t;
111typedef struct vfs_context * vfs_context_t;
112typedef struct vfstable * vfstable_t;
113
114
115#endif /* !BSD_BUILD */
116
117#ifndef _KAUTH_GUID
118#define _KAUTH_GUID
119/* Apple-style globally unique identifier */
120typedef struct {
121#define KAUTH_GUID_SIZE16/* 128-bit identifier */
122unsigned char g_guid[KAUTH_GUID_SIZE];
123} guid_t;
124#define _GUID_T
125#endif /* _KAUTH_GUID */
126
127#ifndef _KAUTH_ACE
128#define _KAUTH_ACE
129struct kauth_ace;
130typedef struct kauth_ace * kauth_ace_t;
131#endif
132#ifndef _KAUTH_ACL
133#define _KAUTH_ACL
134struct kauth_acl;
135typedef struct kauth_acl * kauth_acl_t;
136#endif
137#ifndef _KAUTH_FILESEC
138#define _KAUTH_FILESEC
139struct kauth_filesec;
140typedef struct kauth_filesec * kauth_filesec_t;
141#endif
142
143#endif /* !_KERN_SYS_KERNELTYPES_H_ */
144

Archive Download this file

Revision: 2862