diff options
| author | oster <oster@NetBSD.org> | 2002-10-02 21:48:00 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2002-10-02 21:48:00 +0000 |
| commit | 9fbf5b5d27eb086ae86cf93fe3faf9abe73e2948 (patch) | |
| tree | 31fa2635c7afb7aa447f0b939f8fb266c6f09387 /sys/dev/raidframe | |
| parent | 47ae4d5c59a7343119e819faef7c03d7f129d501 (diff) | |
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 (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_engine.c | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_threadstuff.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_engine.c b/sys/dev/raidframe/rf_engine.c index a086a92bffd..828dc7148ff 100644 --- a/sys/dev/raidframe/rf_engine.c +++ b/sys/dev/raidframe/rf_engine.c @@ -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 @@ rf_ConfigureEngine( 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 --git a/sys/dev/raidframe/rf_threadstuff.h b/sys/dev/raidframe/rf_threadstuff.h index 15445948cc9..75b2bfe36b1 100644 --- a/sys/dev/raidframe/rf_threadstuff.h +++ b/sys/dev/raidframe/rf_threadstuff.h @@ -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 @@ typedef void *RF_ThreadArg_t; 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; |
