]>
git.proxmox.com Git - mirror_zfs.git/blob - modules/spl/spl-rwlock.c
1 #include <sys/rwlock.h>
4 rw_lock_held(krwlock_t
*rwlp
)
6 BUG_ON(rwlp
->rw_magic
!= RW_MAGIC
);
8 #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
9 if (rwlp
->rw_sem
.activity
!= 0) {
11 if (rwlp
->rw_sem
.count
!= 0) {
20 rw_read_held(krwlock_t
*rwlp
)
22 BUG_ON(rwlp
->rw_magic
!= RW_MAGIC
);
24 if (rw_lock_held(rwlp
) && rwlp
->rw_owner
== NULL
) {
32 rw_write_held(krwlock_t
*rwlp
)
34 BUG_ON(rwlp
->rw_magic
!= RW_MAGIC
);
36 if (rwlp
->rw_owner
== current
) {