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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DMOVER (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> DMOVER (9)void dmover_request_free(struct dmover_request ∗req)The dmover_request_free() function frees a dmover request structure. If the dmover functionrequires input buffers, and the input buffer descriptors associated with req were allocated bydmover_request_alloc(), then the input buffer descriptors will also be freed.void dmover_process(struct dmover_request ∗req)The dmover_process() function submits the dmover request req for processing. The call-backspecified by the request is invoked when processing is complete.The dmover_session_create() and dmover_session_destroy() functions must not be calledfrom interrupt context.The dmover_request_alloc(), dmover_request_free(), and dmover_process() functionsmay be called from interrupt handlers at levels IPL_VM, IPL_SOFTCLOCK, and IPL_SOFTNET, orinnoninterruptcontext.The request completion call-back is called from a software interrupt handler at IPL_SOFTCLOCK.BACK-END INTERFACEAback-end describes the dmover functions it can perform using an array of dmover_algdesc structures:struct dmover_algdesc {const char ∗dad_name; /∗ algorithm name ∗/void ∗dad_data; /∗ opaque algorithm description ∗/int dad_ninputs; /∗ number of inputs ∗/};The dad_name member points to a valid dmover function name which the client may specify.dad_data member points to a back-end-specific description of the algorithm.Aback-end presents itself to the dmover facility using the dmover_backend structure. The back-endmust initialize the following members of the structure:const char ∗dmb_nameThis is the name of the back-end.u_int dmb_speedThis is an estimate of the number of kilobytes/second that the back-end can process.void ∗dmb_cookieThis is a pointer to back-end private data.const struct dmover_algdesc ∗dmb_algdescsThis points to an array of dmover_algdesc structures which describe the functions the data movercan perform.int dmb_nalgdescsThis is the number of elements in the dmb_algdescs array.void (∗dmb_process)(struct dmover_backend ∗)This is the entry point to the back-end used to process requests.When invoked bythe dmover facility, the back-end’s (∗dmb_process)() function should examine thepending request queue in its dmover_backend structure:The<strong>NetBSD</strong> 3.0 December 4, 2007 5

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

Saved successfully!

Ooh no, something went wrong!