Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/sys solaris: Give threads less bad names.



details:   https://anonhg.NetBSD.org/src/rev/96595355b94f
branches:  trunk
changeset: 368722:96595355b94f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jul 30 13:09:19 2022 +0000

description:
solaris: Give threads less bad names.

diffstat:

 external/cddl/osnet/sys/kern/misc.c |  8 ++++----
 external/cddl/osnet/sys/sys/proc.h  |  9 ++++++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r d17058939c29 -r 96595355b94f external/cddl/osnet/sys/kern/misc.c
--- a/external/cddl/osnet/sys/kern/misc.c       Sat Jul 30 13:03:05 2022 +0000
+++ b/external/cddl/osnet/sys/kern/misc.c       Sat Jul 30 13:09:19 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.9 2020/06/11 19:20:42 ad Exp $      */
+/*     $NetBSD: misc.c,v 1.10 2022/07/30 13:09:19 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -94,8 +94,8 @@
 }
 
 kthread_t *
-thread_create(void * stk, size_t stksize, void (*proc)(), void *arg,
-             size_t len, proc_t *pp, int state, pri_t pri)
+solaris__thread_create(void * stk, size_t stksize, void (*proc)(), void *arg,
+    size_t len, proc_t *pp, int state, pri_t pri, const char *name)
 {
        int error;
        lwp_t *thr;
@@ -105,7 +105,7 @@
        ASSERT(state == TS_RUN);
 
        error = kthread_create(pri, KTHREAD_MPSAFE, NULL,
-           proc, arg, &thr, "zfs");
+           proc, arg, &thr, "%s", name);
        KASSERT(error == 0);
        return thr;
 }
diff -r d17058939c29 -r 96595355b94f external/cddl/osnet/sys/sys/proc.h
--- a/external/cddl/osnet/sys/sys/proc.h        Sat Jul 30 13:03:05 2022 +0000
+++ b/external/cddl/osnet/sys/sys/proc.h        Sat Jul 30 13:09:19 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.9 2018/11/15 04:55:26 riastradh Exp $       */
+/*     $NetBSD: proc.h,v 1.10 2022/07/30 13:09:19 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -89,8 +89,11 @@
 struct contract {
 };
 
-kthread_t *thread_create(void *, size_t, void (*)(void *), void *, size_t,
-                        proc_t *, int, pri_t);
+#define        thread_create(stk, stksz, proc, arg, len, pp, state, pri)             \
+       solaris__thread_create(stk, stksz, proc, arg, len, pp, state, pri,    \
+           #proc)
+kthread_t *solaris__thread_create(void *, size_t, void (*)(void *), void *,
+    size_t, proc_t *, int, pri_t, const char *);
 void   thread_exit(void);
 void   thread_join(uint64_t);
 



Home | Main Index | Thread Index | Old Index