From bf4843166f2ed50e6435a77b38a011945de0a6f6 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Mon, 13 Dec 2004 12:57:21 +0000 Subject: [PATCH] Add bioq_insert_head() function. OK'd by: phk --- sys/kern/subr_disk.c | 7 +++++++ sys/sys/bio.h | 1 + 2 files changed, 8 insertions(+) diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index fcd0c9da63b0..9d1ef07d0062 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -98,6 +98,13 @@ bioq_flush(struct bio_queue_head *head, struct devstat *stp, int error) biofinish(bp, stp, error); } +void +bioq_insert_head(struct bio_queue_head *head, struct bio *bp) +{ + + TAILQ_INSERT_HEAD(&head->queue, bp, bio_queue); +} + void bioq_insert_tail(struct bio_queue_head *head, struct bio *bp) { diff --git a/sys/sys/bio.h b/sys/sys/bio.h index 52a7bf894563..cb1a5a2486a8 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -118,6 +118,7 @@ struct bio *bioq_first(struct bio_queue_head *head); struct bio *bioq_takefirst(struct bio_queue_head *head); void bioq_flush(struct bio_queue_head *head, struct devstat *stp, int error); void bioq_init(struct bio_queue_head *head); +void bioq_insert_head(struct bio_queue_head *head, struct bio *bp); void bioq_insert_tail(struct bio_queue_head *head, struct bio *bp); void bioq_remove(struct bio_queue_head *head, struct bio *bp);