Module Name: src
Committed By: rmind
Date: Thu Oct 22 22:28:57 UTC 2009
Modified Files:
src/sys/arch/ia64/ia64: vm_machdep.c
src/sys/arch/ia64/include: cpu.h
src/sys/kern: kern_exit.c kern_lwp.c
src/sys/sys: proc.h
Log Message:
Avoid #ifndef __NO_CPU_LWP_FREE, only ia64 is missing cpu_lwp_free
routines and it can/should provide stubs.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/ia64/vm_machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/cpu.h
cvs rdiff -u -r1.222 -r1.223 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.134 -r1.135 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.291 -r1.292 src/sys/sys/proc.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/ia64/ia64/vm_machdep.c
diff -u src/sys/arch/ia64/ia64/vm_machdep.c:1.7 src/sys/arch/ia64/ia64/vm_machdep.c:1.8
--- src/sys/arch/ia64/ia64/vm_machdep.c:1.7 Wed Oct 21 21:12:00 2009
+++ src/sys/arch/ia64/ia64/vm_machdep.c Thu Oct 22 22:28:57 2009
@@ -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;
}
/*
Index: src/sys/arch/ia64/include/cpu.h
diff -u src/sys/arch/ia64/include/cpu.h:1.8 src/sys/arch/ia64/include/cpu.h:1.9
--- src/sys/arch/ia64/include/cpu.h:1.8 Mon Jul 20 04:41:37 2009
+++ src/sys/arch/ia64/include/cpu.h Thu Oct 22 22:28:57 2009
@@ -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 */
Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.222 src/sys/kern/kern_exit.c:1.223
--- src/sys/kern/kern_exit.c:1.222 Sun Jun 28 11:42:43 2009
+++ src/sys/kern/kern_exit.c Thu Oct 22 22:28:57 2009
@@ -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. */
Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.134 src/sys/kern/kern_lwp.c:1.135
--- src/sys/kern/kern_lwp.c:1.134 Wed Oct 21 21:12:06 2009
+++ src/sys/kern/kern_lwp.c Thu Oct 22 22:28:57 2009
@@ -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));
Index: src/sys/sys/proc.h
diff -u src/sys/sys/proc.h:1.291 src/sys/sys/proc.h:1.292
--- src/sys/sys/proc.h:1.291 Fri Oct 2 22:38:45 2009
+++ src/sys/sys/proc.h Thu Oct 22 22:28:57 2009
@@ -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 *);