From 33fa5ccbbf17bc2390e2d136c34926c6f93ac5d1 Mon Sep 17 00:00:00 2001 From: chs Date: Wed, 7 Jul 2010 01:30:32 +0000 Subject: many changes for COMPAT_LINUX: - update the linux syscall table for each platform. - support new-style (NPTL) linux pthreads on all platforms. clone() with CLONE_THREAD uses 1 process with many LWPs instead of separate processes. - move the contents of sys__lwp_setprivate() into a new lwp_setprivate() and use that everywhere. - update linux_release[] and linux32_release[] to "2.6.18". - adjust placement of emul fork/exec/exit hooks as needed and adjust other emul code to match. - convert all struct emul definitions to use named initializers. - change the pid allocator to allow multiple pids to refer to the same proc. - remove a few fields from struct proc that are no longer needed. - disable the non-functional "vdso" code in linux32/amd64, glibc works fine without it. - fix a race in the futex code where we could miss a wakeup after a requeue operation. - redo futex locking to be a little more efficient. --- sys/compat/linux/common/linux_exec.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sys/compat/linux/common/linux_exec.h') diff --git a/sys/compat/linux/common/linux_exec.h b/sys/compat/linux/common/linux_exec.h index e1a7367d32a..75570e5ef26 100644 --- a/sys/compat/linux/common/linux_exec.h +++ b/sys/compat/linux/common/linux_exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.h,v 1.47 2009/12/10 14:13:53 matt Exp $ */ +/* $NetBSD: linux_exec.h,v 1.48 2010/07/07 01:30:35 chs Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -136,12 +136,13 @@ int linux_aout_copyargs(struct lwp *, struct exec_package *, #endif void linux_trapsignal(struct lwp *, ksiginfo_t *); int linux_usertrap(struct lwp *, vaddr_t, void *); -#ifdef LINUX_NPTL -void linux_nptl_proc_fork(struct proc *, struct proc *, void (luserret)(void)); -void linux_nptl_proc_exit(struct proc *); -void linux_nptl_proc_init(struct proc *, struct proc *); -int linux_init_thread_area(struct lwp *, struct lwp *); -#endif +int linux_lwp_setprivate(struct lwp *, void *); + +void linux_e_proc_exec(struct proc *, struct exec_package *); +void linux_e_proc_fork(struct proc *, struct lwp *, int); +void linux_e_proc_exit(struct proc *); +void linux_e_lwp_fork(struct lwp *, struct lwp *); +void linux_e_lwp_exit(struct lwp *); #ifdef EXEC_ELF32 int linux_elf32_probe(struct lwp *, struct exec_package *, void *, -- cgit