aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_event.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-11-13 11:53:02 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-11-13 11:53:02 +0000
commit124e4c3be8dae63a1024352685e1c2b9e64a8312 (patch)
tree15f70d195895ba0b6c385bc2892b07302db4faaa /sys/kern/kern_event.c
parent5512dc546062eb2cfb692fc200ced924a917d205 (diff)
downloadsrc-124e4c3be8dae63a1024352685e1c2b9e64a8312.tar.gz
src-124e4c3be8dae63a1024352685e1c2b9e64a8312.zip
Introduce an alias for FILEDESC_{UN}LOCK() with the suffix _FAST.
Use this in all the places where sleeping with the lock held is not an issue. The distinction will become significant once we finalize the exact lock-type to use for this kind of case.
Notes
Notes: svn path=/head/; revision=137647
Diffstat (limited to 'sys/kern/kern_event.c')
-rw-r--r--sys/kern/kern_event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 61b614c8025f..089b67ec55dc 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -497,9 +497,9 @@ kqueue(struct thread *td, struct kqueue_args *uap)
knlist_init(&kq->kq_sel.si_note, &kq->kq_lock);
TASK_INIT(&kq->kq_task, 0, kqueue_task, kq);
- FILEDESC_LOCK(fdp);
+ FILEDESC_LOCK_FAST(fdp);
SLIST_INSERT_HEAD(&fdp->fd_kqlist, kq, kq_list);
- FILEDESC_UNLOCK(fdp);
+ FILEDESC_UNLOCK_FAST(fdp);
FILE_LOCK(fp);
fp->f_flag = FREAD | FWRITE;
@@ -1391,9 +1391,9 @@ kqueue_close(struct file *fp, struct thread *td)
KQ_UNLOCK(kq);
- FILEDESC_LOCK(fdp);
+ FILEDESC_LOCK_FAST(fdp);
SLIST_REMOVE(&fdp->fd_kqlist, kq, kqueue, kq_list);
- FILEDESC_UNLOCK(fdp);
+ FILEDESC_UNLOCK_FAST(fdp);
knlist_destroy(&kq->kq_sel.si_note);
mtx_destroy(&kq->kq_lock);