get_out_args


get_out_args

Get part of the argument block passed during the last return from invocation.

Signature

Status get_out_args(
	Caddr	dst,
	Csize	offset,
	Csize	length)

Arguments

Semantics

get_out_args is a system call designed to be used after a successful call to kmo_return to retrieve all or part of the passed argument block. The argument block specified at the time of the return is not copied directly into the invoked address space since this would allow a returning locus to overwrite the contents of the new host container.

By calling get_out_args a locus instructs the Grasshopper kernel to place a copy of a region within the argument block defined by [offset, offset + length - 1] at address dst. Depending on the values of offset and length, different regions within the argument block may be copied. offset is a non-negative integer that specifies the start of the region to be copied relative to the start of the argument block. length is a non-negative integer specifying the size of the region to be copied. Regions defined in this way must lie entirely within the argument block.

It is possible to call get_out_args as many times as needed to process the argument block. The state of the argument block will always be that at the time of the call to kmo_return.

The length of the argument block specified in the call to kmo_return is available in an architecture specific CPU register. This register is currently defined for the Alpha AXP architecture. For ease of programming a library call, get_out_size, is provided to return the same information.

Status

get_out_args returns the following Status values: This is returned when the call is able to successfully copy the requested region within the argument block. This occurs if offset is greater than or equal to the length of the argument block. This occurs if offset + length is greater than the length of the argument block.