Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe Create a thread creation macro that make i...



details:   https://anonhg.NetBSD.org/src/rev/225bdecc9250
branches:  trunk
changeset: 537596:225bdecc9250
user:      oster <oster%NetBSD.org@localhost>
date:      Wed Oct 02 21:48:00 2002 +0000

description:
Create a thread creation macro that make it easier to name the DAG process.
Use it to have the DAGExecutionThread have a better name for each RAID
process ('raid0', 'raid1', etc., vs. just 'raid', 'raid', etc.)

diffstat:

 sys/dev/raidframe/rf_engine.c      |  6 +++---
 sys/dev/raidframe/rf_threadstuff.h |  6 +++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diffs (47 lines):

diff -r adfe9ef89643 -r 225bdecc9250 sys/dev/raidframe/rf_engine.c
--- a/sys/dev/raidframe/rf_engine.c     Wed Oct 02 20:35:28 2002 +0000
+++ b/sys/dev/raidframe/rf_engine.c     Wed Oct 02 21:48:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_engine.c,v 1.20 2002/10/02 14:38:53 oster Exp $     */
+/*     $NetBSD: rf_engine.c,v 1.21 2002/10/02 21:48:00 oster Exp $     */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -55,7 +55,7 @@
  ****************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.20 2002/10/02 14:38:53 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.21 2002/10/02 21:48:00 oster Exp $");
 
 #include "rf_threadstuff.h"
 
@@ -139,7 +139,7 @@
        if (rf_engineDebug) {
                printf("raid%d: Creating engine thread\n", raidPtr->raidid);
        }
-       if (RF_CREATE_THREAD(raidPtr->engine_thread, DAGExecutionThread, raidPtr,"raid")) {
+       if (RF_CREATE_ENGINE_THREAD(raidPtr->engine_thread, DAGExecutionThread, raidPtr,"raid%d",raidPtr->raidid)) {
                RF_ERRORMSG("RAIDFRAME: Unable to create engine thread\n");
                return (ENOMEM);
        }
diff -r adfe9ef89643 -r 225bdecc9250 sys/dev/raidframe/rf_threadstuff.h
--- a/sys/dev/raidframe/rf_threadstuff.h        Wed Oct 02 20:35:28 2002 +0000
+++ b/sys/dev/raidframe/rf_threadstuff.h        Wed Oct 02 21:48:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_threadstuff.h,v 1.12 2002/08/08 02:54:30 oster Exp $        */
+/*     $NetBSD: rf_threadstuff.h,v 1.13 2002/10/02 21:48:00 oster Exp $        */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -106,6 +106,10 @@
        kthread_create1((void (*)(void *))(_func_), (void *)(_arg_), \
            (struct proc **)&(_handle_), _name_)
 
+#define        RF_CREATE_ENGINE_THREAD(_handle_, _func_, _arg_, _fmt_, _fmt_arg_) \
+       kthread_create1((void (*)(void *))(_func_), (void *)(_arg_), \
+           (struct proc **)&(_handle_), _fmt_, _fmt_arg_)
+
 struct RF_ThreadGroup_s {
        int     created;
        int     running;



Home | Main Index | Thread Index | Old Index