diff options
author | Brian Behlendorf <[email protected]> | 2012-04-06 11:29:23 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-04-06 12:06:19 -0700 |
commit | b29012b99994ece46019b664d67dace29e5c2586 (patch) | |
tree | 8a06ed6dd8441212d654ec6b940bef953c4cc879 /include/sys/condvar.h | |
parent | 8920c6918a984a9624c853460fe00e9a200bbd48 (diff) |
Remove condition variable names
Long ago I added support to the spl for condition variable names
because I thought they might be needed. It turns out they aren't.
In fact the official Solaris cv_init(9F) man page discourages
their use in the kernel.
cv_init(9F)
Parameters
name - Descriptive string. This is obsolete and should be
NULL. (Non-NULL strings are legal, but they're a
waste of kernel memory.)
Therefore, I'm removing them from the spl to reclaim this memory
and adding an ASSERT() to ensure no new consumers are added which
make use of the name.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'include/sys/condvar.h')
-rw-r--r-- | include/sys/condvar.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/include/sys/condvar.h b/include/sys/condvar.h index ca9dd0f52..59407c2dd 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -39,8 +39,6 @@ typedef struct { int cv_magic; - char *cv_name; - int cv_name_size; wait_queue_head_t cv_event; wait_queue_head_t cv_destroy; atomic_t cv_waiters; @@ -59,13 +57,7 @@ extern clock_t __cv_timedwait_interruptible(kcondvar_t *cvp, kmutex_t *mp, extern void __cv_signal(kcondvar_t *cvp); extern void __cv_broadcast(kcondvar_t *cvp); -#define cv_init(cvp, name, type, arg) \ -({ \ - if ((name) == NULL) \ - __cv_init(cvp, #cvp, type, arg); \ - else \ - __cv_init(cvp, name, type, arg); \ -}) +#define cv_init(cvp, name, type, arg) __cv_init(cvp, name, type, arg) #define cv_destroy(cvp) __cv_destroy(cvp) #define cv_wait(cvp, mp) __cv_wait(cvp, mp) #define cv_wait_interruptible(cvp, mp) __cv_wait_interruptible(cvp,mp) |