mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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 <behlendorf1@llnl.gov>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user