No empty .Rs/.Re
[netbsd-mini2440.git] / sys / compat / mach / mach_exec.h
blob9dbc1137513ffdd87a2e6102f1871f28d1f73dda
1 /* $NetBSD: mach_exec.h,v 1.32 2008/04/28 20:23:44 martin Exp $ */
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas.
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_EXEC_H_
33 #define _MACH_EXEC_H_
35 #include <uvm/uvm_extern.h>
37 #include <compat/mach/mach_types.h>
38 #include <compat/mach/mach_message.h>
39 #include <compat/mach/mach_port.h>
40 #include <compat/mach/mach_exception.h>
43 struct mach_emuldata {
44 int med_inited; /* Is this structure initialized? */
45 int med_thpri; /* Saved priority */
46 LIST_HEAD(med_right, mach_right) med_right;
47 krwlock_t med_rightlock; /* process right list and lock */
48 mach_port_t med_nextright; /* next unused right */
50 struct mach_port *med_bootstrap;/* task bootstrap port */
51 struct mach_port *med_kernel; /* task kernel port */
52 struct mach_port *med_host; /* task host port */
53 struct mach_port *med_exc[MACH_EXC_MAX + 1]; /* Exception ports */
55 int med_dirty_thid; /* Thread id not yet initialized */
56 int med_suspend; /* Suspend semaphore */
57 krwlock_t med_exclock; /* Process exception handler lock */
60 struct mach_lwp_emuldata {
61 struct mach_port *mle_kernel; /* Thread's kernel port */
64 int exec_mach_copyargs(struct lwp *, struct exec_package *,
65 struct ps_strings *, char **, void *);
66 int exec_mach_probe(const char **);
67 void mach_e_proc_init(struct proc *, struct vmspace *);
68 void mach_e_proc_exit(struct proc *);
69 void mach_e_proc_exec(struct proc *, struct exec_package *);
70 void mach_e_proc_fork(struct proc *, struct proc *, int);
71 void mach_e_proc_fork1(struct proc *, struct proc *, int);
72 void mach_e_lwp_fork(struct lwp *, struct lwp *);
73 void mach_e_lwp_exit(struct lwp *);
75 extern struct emul emul_mach;
77 #endif /* !_MACH_EXEC_H_ */