KNF, spelling and english fixes to some comments. remove trailing
whitespace.
This commit is contained in:
parent
08f1ceee65
commit
44ed233ab5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_exception.h,v 1.1 2003/12/09 12:13:44 manu Exp $ */
|
||||
/* $NetBSD: mach_exception.h,v 1.2 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -61,8 +61,8 @@
|
|||
#define MACH_EXC_MASK_RPC_ALERT (1 << MACH_EXC_RPC_ALERT)
|
||||
|
||||
/*
|
||||
* Exceptions codes. Values < 0x10000 are machine dependent, and
|
||||
* are defined in sys/<arch>/include/mach_machdep.h
|
||||
* Exception codes. Values < 0x10000 are machine dependent, and
|
||||
* are defined in sys/<arch>/include/mach_machdep.h.
|
||||
*/
|
||||
#define MACH_EXC_UNIX_BAD_SYSCALL 0x10000 /* unused ? */
|
||||
#define MACH_EXC_UNIX_BAD_PIPE 0x10001 /* unused ? */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_exec.c,v 1.44 2003/12/06 17:04:50 manu Exp $ */
|
||||
/* $NetBSD: mach_exec.c,v 1.45 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.44 2003/12/06 17:04:50 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_exec.c,v 1.45 2003/12/18 01:10:20 grant Exp $");
|
||||
|
||||
#include "opt_syscall_debug.h"
|
||||
|
||||
|
@ -226,7 +226,7 @@ mach_e_proc_fork1(p, parent, allocate)
|
|||
if (allocate)
|
||||
p->p_emuldata = NULL;
|
||||
|
||||
/* Use parent's vmspace because our vmspace may not be setup yet */
|
||||
/* Use parent's vmspace because our vmspace may not be set up yet */
|
||||
mach_e_proc_init(p, parent->p_vmspace);
|
||||
|
||||
med1 = p->p_emuldata;
|
||||
|
@ -257,13 +257,13 @@ mach_e_proc_init(p, vmspace)
|
|||
|
||||
/*
|
||||
* Initialize various things if needed.
|
||||
* XXX Not the best place for that.
|
||||
* XXX Not the best place for this.
|
||||
*/
|
||||
if (mach_cold == 1)
|
||||
mach_init();
|
||||
|
||||
/*
|
||||
* For Darwin binaries, p->p_emuldata is aways allocated:
|
||||
* For Darwin binaries, p->p_emuldata is always allocated:
|
||||
* from the previous program if it had the same emulation,
|
||||
* or from darwin_e_proc_exec(). In the latter situation,
|
||||
* everything has been set to zero.
|
||||
|
@ -293,11 +293,11 @@ mach_e_proc_init(p, vmspace)
|
|||
/*
|
||||
* Do not touch special ports. Some other process (eg: gdb)
|
||||
* might have grabbed them to control the process, and the
|
||||
* controler intend to keep in control even after exec().
|
||||
* controller intend to keep in control even after exec().
|
||||
*/
|
||||
} else {
|
||||
/*
|
||||
* p->p_emuldata is uninitialized. Go ahaead and initialize it.
|
||||
* p->p_emuldata is uninitialized. Go ahead and initialize it.
|
||||
*/
|
||||
LIST_INIT(&med->med_right);
|
||||
lockinit(&med->med_rightlock, PZERO|PCATCH, "mach_right", 0, 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_host.h,v 1.12 2003/11/13 13:40:39 manu Exp $ */
|
||||
/* $NetBSD: mach_host.h,v 1.13 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -156,7 +156,7 @@ typedef struct {
|
|||
mach_msg_trailer_t rep_trailer;
|
||||
} mach_host_get_io_master_reply_t;
|
||||
|
||||
/* Theses are machine dependent functions */
|
||||
/* These are machine dependent functions */
|
||||
void mach_host_basic_info(struct mach_host_basic_info *);
|
||||
void mach_host_priority_info(struct mach_host_priority_info *);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_message.c,v 1.37 2003/12/09 11:29:01 manu Exp $ */
|
||||
/* $NetBSD: mach_message.c,v 1.38 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_message.c,v 1.37 2003/12/09 11:29:01 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_message.c,v 1.38 2003/12/18 01:10:20 grant Exp $");
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_compat_mach.h" /* For COMPAT_MACH in <sys/ktrace.h> */
|
||||
|
@ -132,7 +132,7 @@ mach_sys_msg_overwrite_trap(l, v, retval)
|
|||
|
||||
if ((opt & MACH_RCV_MSG) && (*retval == MACH_MSG_SUCCESS)) {
|
||||
/*
|
||||
* Find a buffer for the reply
|
||||
* Find a buffer for the reply.
|
||||
*/
|
||||
if (SCARG(uap, rcv_msg) != NULL)
|
||||
msg = SCARG(uap, rcv_msg);
|
||||
|
@ -210,7 +210,7 @@ mach_msg_send(l, msg, option, send_size)
|
|||
}
|
||||
|
||||
/*
|
||||
* Check that the process has send a send right on
|
||||
* Check that the process has a send right on
|
||||
* the remote port.
|
||||
*/
|
||||
rights = (MACH_PORT_TYPE_SEND | MACH_PORT_TYPE_SEND_ONCE);
|
||||
|
@ -302,7 +302,7 @@ skip_null_lr:
|
|||
/*
|
||||
* 2) Overwrite kernel memory after the end of the
|
||||
* reply message buffer. This check is the
|
||||
* responsability of the server.
|
||||
* responsibility of the server.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -350,7 +350,7 @@ skip_null_lr:
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Queue the reply
|
||||
* Queue the reply.
|
||||
*/
|
||||
mp = lr->mr_port;
|
||||
(void)mach_message_get(rm, reply_size, mp, NULL);
|
||||
|
@ -393,7 +393,7 @@ out1:
|
|||
mp->mp_recv->mr_sethead);
|
||||
#endif
|
||||
/*
|
||||
* Drop any right carried by the message
|
||||
* Drop any right carried by the message.
|
||||
*/
|
||||
if (lr != NULL) {
|
||||
bits = MACH_MSGH_LOCAL_BITS(sm->msgh_bits);
|
||||
|
@ -406,7 +406,7 @@ out1:
|
|||
}
|
||||
|
||||
/*
|
||||
* Wakeup any process awaiting for this message
|
||||
* Wakeup any process awaiting for this message.
|
||||
*/
|
||||
wakeup(mp->mp_recv->mr_sethead);
|
||||
|
||||
|
@ -442,7 +442,7 @@ mach_msg_recv(l, urm, option, recv_size, timeout, mn)
|
|||
timeout = 0;
|
||||
|
||||
/*
|
||||
* Check for receive right on the port
|
||||
* Check for receive right on the port.
|
||||
*/
|
||||
mr = mach_right_check(mn, l, MACH_PORT_TYPE_RECEIVE);
|
||||
if (mr == NULL) {
|
||||
|
@ -540,7 +540,7 @@ mach_msg_recv(l, urm, option, recv_size, timeout, mn)
|
|||
return MACH_RCV_INTERRUPTED;
|
||||
|
||||
/*
|
||||
* Check we did not loose the receive right
|
||||
* Check we did not lose the receive right
|
||||
* while we were sleeping.
|
||||
*/
|
||||
if ((mach_right_check(mn, l,
|
||||
|
@ -610,8 +610,8 @@ mach_msg_recv(l, urm, option, recv_size, timeout, mn)
|
|||
printf("mach_msg: non kernel-reply message\n");
|
||||
#endif
|
||||
/*
|
||||
* Turn local and remote port names into.
|
||||
* names in the local process namespace
|
||||
* Turn local and remote port names into
|
||||
* names in the local process namespace.
|
||||
*/
|
||||
bits = MACH_MSGH_LOCAL_BITS(mm->mm_msg->msgh_bits);
|
||||
mnp = &mm->mm_msg->msgh_local_port;
|
||||
|
@ -643,7 +643,7 @@ mach_msg_recv(l, urm, option, recv_size, timeout, mn)
|
|||
}
|
||||
|
||||
/*
|
||||
* Copy the message to userland
|
||||
* Copy the message to userland.
|
||||
*/
|
||||
if ((error = copyout(mm->mm_msg, urm, mm->mm_size)) != 0) {
|
||||
ret = MACH_RCV_INVALID_DATA;
|
||||
|
@ -707,7 +707,7 @@ mach_get_target_task(l, mp)
|
|||
|
||||
/*
|
||||
* We need per thread kernel ports to avoid
|
||||
* seeing always the same thread here
|
||||
* always seeing the same thread here.
|
||||
*/
|
||||
tp = (struct proc *)mp->mp_data;
|
||||
tl = proc_representative_lwp(tp);
|
||||
|
@ -746,7 +746,7 @@ mach_drop_rights(mr, bits)
|
|||
}
|
||||
|
||||
/*
|
||||
* When a messages is transmitted from one process to another one,
|
||||
* When a messages is transmitted from one process to another,
|
||||
* we need to make sure the port names are in the receiver process
|
||||
* namespace.
|
||||
*/
|
||||
|
@ -916,8 +916,8 @@ mach_trade_rights_complex(l, mm)
|
|||
ludata = NULL;
|
||||
|
||||
/*
|
||||
* XXX This is unefficient for large chunk of OOL
|
||||
* memory. Think about remapping COW when possible
|
||||
* XXX This is inefficient for large chunk of OOL
|
||||
* memory. Think about remapping COW when possible.
|
||||
*/
|
||||
|
||||
/* This allocates kdata */
|
||||
|
@ -959,7 +959,7 @@ mach_ool_copyin(p, uaddr, kaddr, size, flags)
|
|||
/*
|
||||
* Sanity check OOL size to avoid DoS on malloc: useless once
|
||||
* we remap data instead of copying it. In the meantime,
|
||||
* disabled since it makes some OOL transfer fail
|
||||
* disabled since it makes some OOL transfer fail.
|
||||
*/
|
||||
#if 0
|
||||
if (size > MACH_MAX_OOL_LEN)
|
||||
|
@ -1002,7 +1002,7 @@ mach_ool_copyout(p, kaddr, uaddr, size, flags)
|
|||
/*
|
||||
* Sanity check OOL size to avoid DoS on malloc: useless once
|
||||
* we remap data instead of copying it. In the meantime,
|
||||
* disabled since it makes some OOL transfer fail
|
||||
* disabled since it makes some OOL transfer fail.
|
||||
*/
|
||||
#if 0
|
||||
if (size > MACH_MAX_OOL_LEN) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_message.h,v 1.23 2003/12/09 11:29:01 manu Exp $ */
|
||||
/* $NetBSD: mach_message.h,v 1.24 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001-2003 The NetBSD Foundation, Inc.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_port.c,v 1.46 2003/12/09 11:29:01 manu Exp $ */
|
||||
/* $NetBSD: mach_port.c,v 1.47 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#include "opt_compat_darwin.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_port.c,v 1.46 2003/12/09 11:29:01 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_port.c,v 1.47 2003/12/18 01:10:20 grant Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -861,7 +861,7 @@ mach_right_put_exclocked(mr, right)
|
|||
}
|
||||
|
||||
/*
|
||||
* Check that a process do have a given right
|
||||
* Check that a process has a given right.
|
||||
*/
|
||||
struct mach_right *
|
||||
mach_right_check(mn, l, type)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_task.c,v 1.49 2003/12/09 11:29:01 manu Exp $ */
|
||||
/* $NetBSD: mach_task.c,v 1.50 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -40,7 +40,7 @@
|
|||
#include "opt_compat_darwin.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_task.c,v 1.49 2003/12/09 11:29:01 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_task.c,v 1.50 2003/12/18 01:10:20 grant Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -141,7 +141,7 @@ mach_ports_lookup(args)
|
|||
|
||||
/*
|
||||
* This is some out of band data sent with the reply. In the
|
||||
* encountered situation the out of band data has always been null
|
||||
* encountered situation, the out of band data has always been null
|
||||
* filled. We have to see more of this in order to fully understand
|
||||
* how this trap works.
|
||||
*/
|
||||
|
@ -233,7 +233,7 @@ mach_task_set_special_port(args)
|
|||
mach_port_put(mp);
|
||||
#ifdef COMPAT_DARWIN
|
||||
/*
|
||||
* mach_init sets the bootstrap port for any new process
|
||||
* mach_init sets the bootstrap port for any new process.
|
||||
*/
|
||||
{
|
||||
struct darwin_emuldata *ded;
|
||||
|
@ -328,7 +328,7 @@ mach_task_get_exception_ports(args)
|
|||
|
||||
med = tl->l_proc->p_emuldata;
|
||||
|
||||
/* It always return an array of 32 ports even if only 9 can be used */
|
||||
/* It always returns an array of 32 ports even if only 9 can be used */
|
||||
count = sizeof(rep->rep_old_handler) / sizeof(rep->rep_old_handler[0]);
|
||||
|
||||
mach_set_header(rep, req, *msglen);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_thread.c,v 1.29 2003/12/09 11:29:01 manu Exp $ */
|
||||
/* $NetBSD: mach_thread.c,v 1.30 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_thread.c,v 1.29 2003/12/09 11:29:01 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_thread.c,v 1.30 2003/12/18 01:10:20 grant Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -207,7 +207,7 @@ mach_thread_create_running(args)
|
|||
return mach_msg_error(args, EINVAL);
|
||||
|
||||
/*
|
||||
* Prepare the data we want to transmit to the child
|
||||
* Prepare the data we want to transmit to the child.
|
||||
*/
|
||||
mctc.mctc_flavor = req->req_flavor;
|
||||
mctc.mctc_oldlwp = l;
|
||||
|
@ -224,7 +224,7 @@ mach_thread_create_running(args)
|
|||
return mach_msg_error(args, error);
|
||||
|
||||
/*
|
||||
* Make the child runnable
|
||||
* Make the child runnable.
|
||||
*/
|
||||
SCHED_LOCK(s);
|
||||
mctc.mctc_lwp->l_private = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_thread.h,v 1.13 2003/11/13 13:40:39 manu Exp $ */
|
||||
/* $NetBSD: mach_thread.h,v 1.14 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -188,7 +188,7 @@ typedef struct {
|
|||
mach_msg_trailer_t rep_trailer;
|
||||
} mach_thread_set_state_reply_t;
|
||||
|
||||
/* Theses are machine dependent functions */
|
||||
/* These are machine dependent functions */
|
||||
int mach_thread_get_state_machdep(struct lwp *, int, void *, int *);
|
||||
int mach_thread_set_state_machdep(struct lwp *, int, void *);
|
||||
void mach_create_thread_child(void *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_vm.c,v 1.44 2003/12/09 11:29:01 manu Exp $ */
|
||||
/* $NetBSD: mach_vm.c,v 1.45 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#include "opt_ktrace.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_vm.c,v 1.44 2003/12/09 11:29:01 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_vm.c,v 1.45 2003/12/18 01:10:20 grant Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -263,8 +263,8 @@ mach_vm_deallocate(args)
|
|||
}
|
||||
|
||||
/*
|
||||
* XXX This server message Id clashes with bootstrap_look_up
|
||||
* Is there a wway to resolve this easily?
|
||||
* XXX This server message Id clashes with bootstrap_look_up.
|
||||
* Is there a way to resolve this easily?
|
||||
*/
|
||||
#if 0
|
||||
int
|
||||
|
@ -289,7 +289,7 @@ mach_vm_wire(args)
|
|||
return mach_msg_error(args, EINVAL);
|
||||
|
||||
/*
|
||||
* Mach maitains a count of how many times a page is wired
|
||||
* Mach maintains a count of how many times a page is wired
|
||||
* and unwire it once the count is zero. We cannot do that yet.
|
||||
*/
|
||||
if (req->req_access == 0) {
|
||||
|
@ -758,7 +758,7 @@ mach_vm_read(args)
|
|||
|
||||
/*
|
||||
* Copy the data from the target process to the current process
|
||||
* This is reasonnable for small chunk of data, but we should
|
||||
* This is reasonable for small chunk of data, but we should
|
||||
* remap COW for areas bigger than a page.
|
||||
*/
|
||||
buf = malloc(size, M_EMULDATA, M_WAITOK);
|
||||
|
@ -815,7 +815,7 @@ mach_vm_write(args)
|
|||
|
||||
/*
|
||||
* Copy the data from the current process to the target process
|
||||
* This is reasonnable for small chunk of data, but we should
|
||||
* This is reasonable for small chunk of data, but we should
|
||||
* remap COW for areas bigger than a page.
|
||||
*/
|
||||
size = req->req_data.size;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_vm.h,v 1.25 2003/12/08 12:03:16 manu Exp $ */
|
||||
/* $NetBSD: mach_vm.h,v 1.26 2003/12/18 01:10:20 grant Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
|
||||
|
@ -392,7 +392,7 @@ struct mach_memory_entry {
|
|||
size_t mme_size;
|
||||
};
|
||||
|
||||
/* Theses are machine dependent functions */
|
||||
/* These are machine dependent functions */
|
||||
int mach_vm_machine_attribute_machdep(struct lwp *, vaddr_t, size_t, int *);
|
||||
|
||||
#endif /* _MACH_VM_H_ */
|
||||
|
|
Loading…
Reference in New Issue