Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cp...
details: https://anonhg.NetBSD.org/src/rev/1afd14314d10
branches: trunk
changeset: 748389:1afd14314d10
user: rmind <rmind%NetBSD.org@localhost>
date: Thu Oct 22 22:28:57 2009 +0000
description:
Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.
diffstat:
sys/arch/ia64/ia64/vm_machdep.c | 14 ++++++++++++--
sys/arch/ia64/include/cpu.h | 5 +----
sys/kern/kern_exit.c | 6 ++----
sys/kern/kern_lwp.c | 9 +++------
sys/sys/proc.h | 6 +-----
5 files changed, 19 insertions(+), 21 deletions(-)
diffs (135 lines):
diff -r 24f19b066a18 -r 1afd14314d10 sys/arch/ia64/ia64/vm_machdep.c
--- a/sys/arch/ia64/ia64/vm_machdep.c Thu Oct 22 21:56:13 2009 +0000
+++ b/sys/arch/ia64/ia64/vm_machdep.c Thu Oct 22 22:28:57 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.7 2009/10/21 21:12:00 rmind Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.8 2009/10/22 22:28:57 rmind Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -49,7 +49,17 @@
void
cpu_lwp_free(struct lwp *l, int proc)
{
-printf("%s: not yet\n", __func__);
+
+ /* XXX: Not yet. */
+ (void)l;
+ (void)proc;
+}
+
+void
+cpu_lwp_free2(struct lwp *l)
+{
+
+ (void)l;
}
/*
diff -r 24f19b066a18 -r 1afd14314d10 sys/arch/ia64/include/cpu.h
--- a/sys/arch/ia64/include/cpu.h Thu Oct 22 21:56:13 2009 +0000
+++ b/sys/arch/ia64/include/cpu.h Thu Oct 22 22:28:57 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.8 2009/07/20 04:41:37 kiyohara Exp $ */
+/* $NetBSD: cpu.h,v 1.9 2009/10/22 22:28:57 rmind Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -175,8 +175,5 @@
asm ("hint @pause" ::: "memory");
}
-/* XXX: revisit later */
-#define __NO_CPU_LWP_FREE
-
#endif /* _KERNEL_ */
#endif /* _IA64_CPU_H */
diff -r 24f19b066a18 -r 1afd14314d10 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c Thu Oct 22 21:56:13 2009 +0000
+++ b/sys/kern/kern_exit.c Thu Oct 22 22:28:57 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exit.c,v 1.222 2009/06/28 11:42:43 yamt Exp $ */
+/* $NetBSD: kern_exit.c,v 1.223 2009/10/22 22:28:57 rmind Exp $ */
/*-
* Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.222 2009/06/28 11:42:43 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.223 2009/10/22 22:28:57 rmind Exp $");
#include "opt_ktrace.h"
#include "opt_perfctrs.h"
@@ -559,9 +559,7 @@
* resources. This must be done before uvm_lwp_exit(), in
* case these resources are in the PCB.
*/
-#ifndef __NO_CPU_LWP_FREE
cpu_lwp_free(l, 1);
-#endif
pmap_deactivate(l);
/* This process no longer needs to hold the kernel lock. */
diff -r 24f19b066a18 -r 1afd14314d10 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c Thu Oct 22 21:56:13 2009 +0000
+++ b/sys/kern/kern_lwp.c Thu Oct 22 22:28:57 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_lwp.c,v 1.134 2009/10/21 21:12:06 rmind Exp $ */
+/* $NetBSD: kern_lwp.c,v 1.135 2009/10/22 22:28:57 rmind Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -209,7 +209,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.134 2009/10/21 21:12:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.135 2009/10/22 22:28:57 rmind Exp $");
#include "opt_ddb.h"
#include "opt_lockdebug.h"
@@ -846,9 +846,7 @@
*
* Free MD LWP resources.
*/
-#ifndef __NO_CPU_LWP_FREE
cpu_lwp_free(l, 0);
-#endif
if (current) {
pmap_deactivate(l);
@@ -953,9 +951,8 @@
pool_cache_put(turnstile_cache, l->l_ts);
if (l->l_name != NULL)
kmem_free(l->l_name, MAXCOMLEN);
-#ifndef __NO_CPU_LWP_FREE
+
cpu_lwp_free2(l);
-#endif
uvm_lwp_exit(l);
KASSERT(SLIST_EMPTY(&l->l_pi_lenders));
diff -r 24f19b066a18 -r 1afd14314d10 sys/sys/proc.h
--- a/sys/sys/proc.h Thu Oct 22 21:56:13 2009 +0000
+++ b/sys/sys/proc.h Thu Oct 22 22:28:57 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.291 2009/10/02 22:38:45 elad Exp $ */
+/* $NetBSD: proc.h,v 1.292 2009/10/22 22:28:57 rmind Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -495,12 +495,8 @@
int pgid_in_session(struct proc *, pid_t);
void cpu_lwp_fork(struct lwp *, struct lwp *, void *, size_t,
void (*)(void *), void *);
-#ifndef cpu_lwp_free
void cpu_lwp_free(struct lwp *, int);
-#ifndef cpu_lwp_free2
void cpu_lwp_free2(struct lwp *);
-#endif
-#endif
#ifdef __HAVE_SYSCALL_INTERN
void syscall_intern(struct proc *);
Home |
Main Index |
Thread Index |
Old Index