Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern Store l_name for kernel threads.



details:   https://anonhg.NetBSD.org/src/rev/48ef384f834b
branches:  trunk
changeset: 751954:48ef384f834b
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 09 16:53:13 2010 +0000

description:
Store l_name for kernel threads.

diffstat:

 sys/rump/librump/rumpkern/rump.c    |  6 ++++--
 sys/rump/librump/rumpkern/threads.c |  9 +++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diffs (57 lines):

diff -r fda23ea50c31 -r 48ef384f834b sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Tue Feb 09 16:46:07 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Tue Feb 09 16:53:13 2010 +0000
@@ -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));
 }
 
diff -r fda23ea50c31 -r 48ef384f834b sys/rump/librump/rumpkern/threads.c
--- a/sys/rump/librump/rumpkern/threads.c       Tue Feb 09 16:46:07 2010 +0000
+++ b/sys/rump/librump/rumpkern/threads.c       Tue Feb 09 16:53:13 2010 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index