Module Name: src
Committed By: pooka
Date: Tue Feb 9 16:53:13 UTC 2010
Modified Files:
src/sys/rump/librump/rumpkern: rump.c threads.c
Log Message:
Store l_name for kernel threads.
To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpkern/threads.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.151 src/sys/rump/librump/rumpkern/rump.c:1.152
--- src/sys/rump/librump/rumpkern/rump.c:1.151 Fri Jan 15 20:39:46 2010
+++ src/sys/rump/librump/rumpkern/rump.c Tue Feb 9 16:53:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.151 2010/01/15 20:39:46 pooka Exp $ */
+/* $NetBSD: rump.c,v 1.152 2010/02/09 16:53:13 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.151 2010/01/15 20:39:46 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.152 2010/02/09 16:53:13 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -502,6 +502,8 @@
KASSERT(l->l_flag & LW_WEXIT);
KASSERT(l->l_mutex == NULL);
+ if (l->l_name)
+ kmem_free(l->l_name, MAXCOMLEN);
kmem_free(l, sizeof(*l));
}
Index: src/sys/rump/librump/rumpkern/threads.c
diff -u src/sys/rump/librump/rumpkern/threads.c:1.7 src/sys/rump/librump/rumpkern/threads.c:1.8
--- src/sys/rump/librump/rumpkern/threads.c:1.7 Wed Jan 27 20:16:16 2010
+++ src/sys/rump/librump/rumpkern/threads.c Tue Feb 9 16:53:13 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: threads.c,v 1.7 2010/01/27 20:16:16 pooka Exp $ */
+/* $NetBSD: threads.c,v 1.8 2010/02/09 16:53:13 pooka Exp $ */
/*
* Copyright (c) 2007-2009 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.7 2010/01/27 20:16:16 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.8 2010/02/09 16:53:13 pooka Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -144,6 +144,11 @@
l->l_pflag |= LP_BOUND;
l->l_cpu = ci;
}
+ if (thrname) {
+ l->l_name = kmem_alloc(MAXCOMLEN, KM_SLEEP);
+ strlcpy(l->l_name, thrname, MAXCOMLEN);
+ }
+
rv = rumpuser_thread_create(threadbouncer, k, thrname);
if (rv)
return rv;