summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-06-30 02:26:59 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-06-30 02:26:59 +0000
commitee0711ecf155f99de3bedc9c7f0f55258f3b6adb (patch)
tree58b809103c6c0166c30df69879a951f9f1fbf1d7
parent9cd4b11748e94ef97c0cb0e5bef233e7c075620d (diff)
Switch bufq FIFO disclipline from using TAILQs to SIMPLEQs.
ok thib@
-rw-r--r--sys/kern/kern_bufq.c12
-rw-r--r--sys/sys/buf.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/kern_bufq.c b/sys/kern/kern_bufq.c
index 23f209abe25..ec6312d436d 100644
--- a/sys/kern/kern_bufq.c
+++ b/sys/kern/kern_bufq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_bufq.c,v 1.9 2010/06/29 18:52:20 kettenis Exp $ */
+/* $OpenBSD: kern_bufq.c,v 1.10 2010/06/30 02:26:58 matthew Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
*
@@ -251,7 +251,7 @@ bufq_fifo_queue(struct bufq *bq, struct buf *bp)
bq->bufq_outstanding++;
bp->b_bq = bq;
- TAILQ_INSERT_TAIL(head, bp, b_bufq.bufq_data_fifo.bqf_entries);
+ SIMPLEQ_INSERT_TAIL(head, bp, b_bufq.bufq_data_fifo.bqf_entries);
}
void
@@ -261,7 +261,7 @@ bufq_fifo_requeue(struct bufq *bq, struct buf *bp)
bq->bufq_outstanding++;
bp->b_bq = bq;;
- TAILQ_INSERT_HEAD(head, bp, b_bufq.bufq_data_fifo.bqf_entries);
+ SIMPLEQ_INSERT_HEAD(head, bp, b_bufq.bufq_data_fifo.bqf_entries);
}
struct buf *
@@ -271,9 +271,9 @@ bufq_fifo_dequeue(struct bufq *bq, int peeking)
struct buf *bp;
mtx_enter(&bq->bufq_mtx);
- bp = TAILQ_FIRST(head);
+ bp = SIMPLEQ_FIRST(head);
if (bp != NULL && !peeking)
- TAILQ_REMOVE(head, bp, b_bufq.bufq_data_fifo.bqf_entries);
+ SIMPLEQ_REMOVE_HEAD(head, b_bufq.bufq_data_fifo.bqf_entries);
mtx_leave(&bq->bufq_mtx);
return (bp);
@@ -288,7 +288,7 @@ bufq_fifo_init(struct bufq *bq)
if (head == NULL)
return (ENOMEM);
- TAILQ_INIT(head);
+ SIMPLEQ_INIT(head);
bq->bufq_data = head;
return (0);
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index b2b14244cec..3b047300dd5 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.h,v 1.69 2010/06/29 18:52:20 kettenis Exp $ */
+/* $OpenBSD: buf.h,v 1.70 2010/06/30 02:26:58 matthew Exp $ */
/* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */
/*
@@ -89,9 +89,9 @@ struct buf *bufq_fifo_dequeue(struct bufq *, int);
void bufq_fifo_queue(struct bufq *, struct buf *);
void bufq_fifo_requeue(struct bufq *, struct buf *);
int bufq_fifo_init(struct bufq *);
-TAILQ_HEAD(bufq_fifo_head, buf);
+SIMPLEQ_HEAD(bufq_fifo_head, buf);
struct bufq_fifo {
- TAILQ_ENTRY(buf) bqf_entries;
+ SIMPLEQ_ENTRY(buf) bqf_entries;
};
union bufq_data {