Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/darwin lwp conversion
details: https://anonhg.NetBSD.org/src/rev/3a038f63f4bd
branches: trunk
changeset: 542144:3a038f63f4bd
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 22 17:47:03 2003 +0000
description:
lwp conversion
diffstat:
sys/compat/darwin/darwin_mman.c | 13 +++++++------
sys/compat/darwin/darwin_signal.c | 11 ++++++-----
sys/compat/darwin/darwin_sysctl.c | 14 +++++++-------
sys/compat/darwin/darwin_sysent.c | 8 ++++----
sys/compat/darwin/darwin_thread.c | 23 ++++++++++++-----------
5 files changed, 36 insertions(+), 33 deletions(-)
diffs (270 lines):
diff -r c2eaa5ddee7d -r 3a038f63f4bd sys/compat/darwin/darwin_mman.c
--- a/sys/compat/darwin/darwin_mman.c Wed Jan 22 17:12:41 2003 +0000
+++ b/sys/compat/darwin/darwin_mman.c Wed Jan 22 17:47:03 2003 +0000
@@ -1,6 +1,6 @@
#undef DEBUG_DARWIN
#undef DEBUG_MACH
-/* $NetBSD: darwin_mman.c,v 1.5 2002/12/24 12:13:15 manu Exp $ */
+/* $NetBSD: darwin_mman.c,v 1.6 2003/01/22 17:47:03 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_mman.c,v 1.5 2002/12/24 12:13:15 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_mman.c,v 1.6 2003/01/22 17:47:03 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -64,8 +64,8 @@
#include <compat/darwin/darwin_syscallargs.h>
int
-darwin_sys_load_shared_file(p, v, retval)
- struct proc *p;
+darwin_sys_load_shared_file(l, v, retval)
+ struct lwp *l;
void *v;
register_t *retval;
{
@@ -82,6 +82,7 @@
struct filedesc *fdp;
struct vnode *vp;
vaddr_t base;
+ struct proc *p = l->l_proc;
int flags;
char filename[MAXPATHLEN + 1];
mach_sf_mapping_t *mapp;
@@ -120,7 +121,7 @@
SCARG(&open_cup, path) = SCARG(uap, filename);
SCARG(&open_cup, flags) = O_RDONLY;
SCARG(&open_cup, mode) = 0;
- if ((error = bsd_sys_open(p, &open_cup, &fd)) != 0)
+ if ((error = bsd_sys_open(l, &open_cup, &fd)) != 0)
return error;
fdp = p->p_fd;
@@ -230,7 +231,7 @@
vrele(vp);
FILE_UNUSE(fp, p);
SCARG(&close_cup, fd) = fd;
- if ((error = sys_close(p, &close_cup, retval)) != 0)
+ if ((error = sys_close(l, &close_cup, retval)) != 0)
return error;
if ((error = copyout(&base, SCARG(uap, base), sizeof(base))) != 0)
diff -r c2eaa5ddee7d -r 3a038f63f4bd sys/compat/darwin/darwin_signal.c
--- a/sys/compat/darwin/darwin_signal.c Wed Jan 22 17:12:41 2003 +0000
+++ b/sys/compat/darwin/darwin_signal.c Wed Jan 22 17:47:03 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_signal.c,v 1.4 2002/11/29 13:17:22 manu Exp $ */
+/* $NetBSD: darwin_signal.c,v 1.5 2003/01/22 17:47:03 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_signal.c,v 1.4 2002/11/29 13:17:22 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_signal.c,v 1.5 2003/01/22 17:47:03 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -56,8 +56,8 @@
#include <compat/darwin/darwin_syscallargs.h>
int
-darwin_sys_sigaction(p, v, retval)
- struct proc *p;
+darwin_sys_sigaction(l, v, retval)
+ struct lwp *l;
void *v;
register_t *retval;
{
@@ -71,6 +71,7 @@
struct sigaction sa;
struct sigaction *nsa, *osa;
struct sigaction13 sa13;
+ struct proc *p = l->l_proc;
caddr_t sg = stackgap_init(p, 0);
int error;
@@ -98,7 +99,7 @@
SCARG(&cup, tramp) = dsa.darwin_sa_tramp;
SCARG(&cup, vers) = 1;
- if ((error = sys___sigaction_sigtramp(p, &cup, retval)) !=0)
+ if ((error = sys___sigaction_sigtramp(l, &cup, retval)) !=0)
return error;
if (SCARG(uap, osa) == NULL)
diff -r c2eaa5ddee7d -r 3a038f63f4bd sys/compat/darwin/darwin_sysctl.c
--- a/sys/compat/darwin/darwin_sysctl.c Wed Jan 22 17:12:41 2003 +0000
+++ b/sys/compat/darwin/darwin_sysctl.c Wed Jan 22 17:47:03 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_sysctl.c,v 1.8 2003/01/03 14:47:27 manu Exp $ */
+/* $NetBSD: darwin_sysctl.c,v 1.9 2003/01/22 17:47:03 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_sysctl.c,v 1.8 2003/01/03 14:47:27 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_sysctl.c,v 1.9 2003/01/22 17:47:03 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -76,7 +76,7 @@
(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
int
-darwin_sys___sysctl(struct proc *p, void *v, register_t *retval)
+darwin_sys___sysctl(struct lwp *l, void *v, register_t *retval)
{
struct darwin_sys___sysctl_args /* {
syscallarg(int *) name;
@@ -97,6 +97,7 @@
size_t *oldlenp = SCARG(uap, oldlenp);
void *newp = SCARG(uap, newp);
size_t newlen = SCARG(uap, newlen);
+ struct proc *p = l->l_proc;
/*
* all top-level sysctl names are non-terminal
@@ -404,19 +405,18 @@
* of course).
*/
int
-darwin_sys_getpid(p, v, retval)
- struct proc *p;
+darwin_sys_getpid(l, v, retval)
+ struct lwp *l;
void *v;
register_t *retval;
{
struct darwin_emuldata *ded;
+ struct proc *p = l->l_proc;
ded = (struct darwin_emuldata *)p->p_emuldata;
-#ifdef DEBUG_DARWIN
printf("pid %d: fakepid = %d, mach_init_pid = %d\n",
p->p_pid, ded->ded_fakepid, darwin_init_pid);
-#endif
if (ded->ded_fakepid != 0)
*retval = ded->ded_fakepid;
else
diff -r c2eaa5ddee7d -r 3a038f63f4bd sys/compat/darwin/darwin_sysent.c
--- a/sys/compat/darwin/darwin_sysent.c Wed Jan 22 17:12:41 2003 +0000
+++ b/sys/compat/darwin/darwin_sysent.c Wed Jan 22 17:47:03 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_sysent.c,v 1.18 2003/01/18 23:30:22 thorpej Exp $ */
+/* $NetBSD: darwin_sysent.c,v 1.19 2003/01/22 17:47:03 christos Exp $ */
/*
* System call switch table.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_sysent.c,v 1.18 2003/01/18 23:30:22 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_sysent.c,v 1.19 2003/01/22 17:47:03 christos Exp $");
#include "opt_ktrace.h"
#include "opt_nfsserver.h"
@@ -147,8 +147,8 @@
compat_13_sys_sigprocmask }, /* 48 = sigprocmask13 */
{ 2, s(struct sys___getlogin_args), 0,
sys___getlogin }, /* 49 = __getlogin */
- { 1, s(struct sys_setlogin_args), 0,
- sys_setlogin }, /* 50 = setlogin */
+ { 1, s(struct sys___setlogin_args), 0,
+ sys___setlogin }, /* 50 = __setlogin */
{ 1, s(struct bsd_sys_acct_args), 0,
bsd_sys_acct }, /* 51 = acct */
{ 0, 0, 0,
diff -r c2eaa5ddee7d -r 3a038f63f4bd sys/compat/darwin/darwin_thread.c
--- a/sys/compat/darwin/darwin_thread.c Wed Jan 22 17:12:41 2003 +0000
+++ b/sys/compat/darwin/darwin_thread.c Wed Jan 22 17:47:03 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_thread.c,v 1.3 2002/12/27 09:59:27 manu Exp $ */
+/* $NetBSD: darwin_thread.c,v 1.4 2003/01/22 17:47:03 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_thread.c,v 1.3 2002/12/27 09:59:27 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_thread.c,v 1.4 2003/01/22 17:47:03 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -63,14 +63,14 @@
* the parent as well as the child.
*/
int
-darwin_sys_fork(p, v, retval)
- struct proc *p;
+darwin_sys_fork(l, v, retval)
+ struct lwp *l;
void *v;
register_t *retval;
{
int error;
- if ((error = fork1(p, 0, SIGCHLD, NULL, 0,
+ if ((error = fork1(l, 0, SIGCHLD, NULL, 0,
darwin_fork_child_return, NULL, retval, NULL)) != 0);
return error;
@@ -78,14 +78,14 @@
}
int
-darwin_sys_vfork(p, v, retval)
- struct proc *p;
+darwin_sys_vfork(l, v, retval)
+ struct lwp *l;
void *v;
register_t *retval;
{
int error;
- if ((error = fork1(p, FORK_PPWAIT, SIGCHLD, NULL, 0,
+ if ((error = fork1(l, FORK_PPWAIT, SIGCHLD, NULL, 0,
darwin_fork_child_return, NULL, retval, NULL)) != 0);
return error;
@@ -93,8 +93,8 @@
}
int
-darwin_sys_pthread_exit(p, v, retval)
- struct proc *p;
+darwin_sys_pthread_exit(l, v, retval)
+ struct lwp *l;
void *v;
register_t *retval;
{
@@ -103,6 +103,7 @@
} */ *uap = v;
struct sys_exit_args cup;
struct mach_emuldata *med;
+ struct proc *p = l->l_proc;
int error;
/* Get the status or use zero if it is not possible */
@@ -114,5 +115,5 @@
med = (struct mach_emuldata *)p->p_emuldata;
LIST_INIT(&med->med_right);
- return sys_exit(p, &cup, retval);
+ return sys_exit(l, &cup, retval);
}
Home |
Main Index |
Thread Index |
Old Index