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.

DMOVER (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> DMOVER (9)dmover_process().void (∗dreq_callback)(struct dmover_request ∗)This is a pointer to an optional call-back function provided by the client. If provided, the call-back isinvoked when the request is complete. This field must be NULL if DMOVER_REQ_WAIT is set indreq_flags.void ∗dreq_cookieThis is a pointer to client private data specific to the request.void ∗dreq_dmbcookieThis is a pointer to back-end private data, for use while the back-end is actively processing a request.volatile int dreq_flagsThe following flags are defined:DMOVER_REQ_DONEDMOVER_REQ_ERRORThe request has been completed. If not using a call-back, the clientmay poll this bit to determine if a request has been processed.An error has occurred while processing the request.DMOVER_REQ_RUNNING The request is currently being executed by the back-end. Once a commandis running, it cannot be cancelled, and must run to completion.DMOVER_REQ_WAITIf set by the client, dmover_process() will wait for the request tocomplete using cv_wait(9). This flag may only be used if the callerhas a valid thread context. If this flag is set, a callback may not beused.int dreq_errorIf the DMOVER_REQ_ERROR bit is set, this contains the errno(2) value indicating the error thatoccurred during processing.dmover_buffer_type dreq_outbuf_typeThe type of the output buffer.dmover_buffer dreq_outbufThe output buffer.uint8_t dreq_immediate[8]This is the input for algorithms which use an immediate value. Values smaller than 8 bytes shoulduse the least-significant bytes first. For example, a 32-bit integer would occupy bytes 0, 1, 2, and 3.dmover_buffer_type dreq_inbuf_typeThe type of the input buffer. This is only used if the dmover function has one or more inputs.dmover_buffer ∗dreq_inbufApointer to an array of input buffers. This is only used if the dmover function has one or moreinputs. The number of inputs, and thus the number of valid elements in the array, isspecified by thealgorithm description for the session.CLIENT INTERFACEThe following functions are provided to the client:int dmover_session_create(const char ∗function , struct dmover_session∗∗sessionp)The dmover_session_create() function creates a data mover session for the specified datamovement function function. Ahandle to the new session is returned in ∗sessionp.<strong>NetBSD</strong> 3.0 December 4, 2007 3

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

Saved successfully!

Ooh no, something went wrong!