next up previous contents index
Next: 5.4.5 copy: Create a Up: 5.4 oskit_bufio: Buffer-based I/O Previous: 5.4.3 wire: Wire a

5.4.4 unwire: Unwire a previously wired region of this buffer

 

SYNOPSIS

#include <oskit/io/bufio.h>

OSKIT_COMDECL unwire(oskit_bufio_t *io, void *addr, oskit_off_t offset, oskit_size_t amount);

DESCRIPTION

After a successful call to the wire method, the client should call this method after the hardware is finished accessing the buffer directly, so that the buffer object can clean up and free any resources that might be associated with the wiring.

The addr parameter passed to this method must be exactly the value returned by the wire request, and the offset and amount parameters must be exactly the same as the values previously passed in the corresponding wire call. In other words, clients must only attempt to unwire whole regions; they must not attempt to unwire only part of a region, or to unwire two previously wired regions in one call, even if the two regions appear to be contiguous in physical memory.

PARAMETERS

io
The object whose contents are to be wired.
addr
The address of the wired region, as returned from the corresponding map call.
offset
The offset into the buffer of the wired region, as passed to the corresponding wire call.
size
The size of the wired region, as passed to the corresponding wire call.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group