diff options
| author | mrg <mrg@NetBSD.org> | 2011-05-11 18:13:12 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2011-05-11 18:13:12 +0000 |
| commit | 5e1b9a4c81acf07afe2e53eb156bb859a76a95ee (patch) | |
| tree | 61b84f47648dd3b4190a212bbad2e324d653ecc9 /sys/dev/raidframe/rf_threadstuff.h | |
| parent | aad8c4ad3b56bf3ca9f708d4e111f2932fee7b06 (diff) | |
convert the main raidPtr mutex to a kmutex, and add a couple of cv's to
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond.
convert all remaining simple_lock's to kmutexes (they're not used or compiled
right now... even with all options enabled) and remove the support for them.
this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.
Diffstat (limited to 'sys/dev/raidframe/rf_threadstuff.h')
| -rw-r--r-- | sys/dev/raidframe/rf_threadstuff.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/sys/dev/raidframe/rf_threadstuff.h b/sys/dev/raidframe/rf_threadstuff.h index 0eb96ad2faf..0d40c377989 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.32 2011/05/11 05:14:07 mrg Exp $ */ +/* $NetBSD: rf_threadstuff.h,v 1.33 2011/05/11 18:13:12 mrg Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -54,26 +54,9 @@ #include <dev/raidframe/raidframevar.h> -/* Old school simple_lock */ typedef struct lwp *RF_Thread_t; typedef void *RF_ThreadArg_t; -#define RF_DECLARE_MUTEX(_m_) struct simplelock _m_; - -#define RF_DECLARE_COND(_c_) int _c_; - -#define RF_LOCK_MUTEX(_m_) simple_lock(&(_m_)) -#define RF_UNLOCK_MUTEX(_m_) simple_unlock(&(_m_)) - -#define RF_WAIT_COND(_c_,_m_) \ - ltsleep(&(_c_), PRIBIO, "rfwcond", 0, &(_m_)) -#define RF_SIGNAL_COND(_c_) wakeup_one(&(_c_)) - -#define rf_mutex_init(m) simple_lock_init(m) - - -/* Modern mutex */ -/* Note that rf_declare_{mutex,cond}2() do _NOT_ append the ; */ #define rf_declare_mutex2(_m_) kmutex_t _m_ #define rf_declare_cond2(_c_) kcondvar_t _c_ |
