next up previous contents index
Next: 6.14.3 osenv_io_free: Release a Up: 6.14 I/O Ports Previous: 6.14.1 osenv_io_avail: Check availability

6.14.2 osenv_io_alloc: Allocate a range of ports

 

SYNOPSIS

oskit_error_t osenv_io_alloc(oskit_addr_t port, oskit_size_t size);

DIRECTION

Component tex2html_wrap_inline32841 OS, Nonblocking

DESCRIPTION

Returns 0 if the range is free, or an error code if any ports in the range are already allocated.

XXX: shared ports?

XXX: Default implementation panics if range is allocated.

Note: this is based on the assumption that I/O space is not mapped through the MMU. On a system where this is not the case (memory mapped I/O), osenv_mem_map_phys should be used instead.

PARAMETERS

port
The start of the I/O range.
size
The number of ports to check.



University of Utah Flux Research Group