12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BUFQ (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> BUFQ (9)<strong>NAME</strong>bufq, bufq_state, bufq_alloc, bufq_drain, bufq_free, bufq_getstrategyname,bufq_move, BUFQ_PUT, BUFQ_GET, BUFQ_PEEK, BUFQ_CANCEL —device buffer queuesSYNOPSIS#include intbufq_alloc(struct bufq_state ∗∗bufq , const char ∗strategy , int flags);voidbufq_drain(struct bufq_state ∗bufq);voidbufq_free(struct bufq_state ∗bufq);const char ∗bufq_getstrategyname(struct bufq_state ∗bufq);voidbufq_move(struct bufq_state ∗dst , struct bufq_state ∗src);voidBUFQ_PUT(struct bufq_state ∗bufq , struct buf ∗bp);struct buf ∗BUFQ_GET(struct bufq_state ∗bufq);struct buf ∗BUFQ_PEEK(struct bufq_state ∗bufq);struct buf ∗BUFQ_CANCEL(struct bufq_state ∗bufq , struct buf ∗bp);DESCRIPTIONThe bufq subsystem is a set of operations for the management of device buffer queues.The primary data type for using the operations is the bufq_state structure, which is opaque for users.FUNCTIONSbufq_alloc(bufq , strategy , flags)Allocate and initialize a bufq_state descriptor.The argument strategy specifies a buffer queue strategy to be used for this buffer queue. Thefollowing special values can be used:BUFQ_STRAT_ANYLet bufq_alloc() select a strategy.BUFQ_DISK_DEFAULT_STRAT Let bufq_alloc() select a strategy, assuming it willbe used for a normal disk device.Valid bits for the flags are:BUFQ_SORT_RAWBLOCK sort by b_rawblknoBUFQ_SORT_CYLINDER sort by b_cylinder and then by b_rawblknoBUFQ_EXACTFail if a strategy specified by strategy is not available. Inthat case, bufq_alloc returns ENOENT. Ifthis flag is notspecified, bufq_alloc() will silently use one of availablestrategies.<strong>NetBSD</strong> 3.0 December 26, 2005 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!