]>
Commit | Line | Data |
---|---|---|
9bccf70c | 1 | <h2>device_read_overwrite</h2>\r<hr>\r<p><strong>System Trap</strong> -- Read a sequence of bytes from a specific device into my address space.\r<h3>SYNOPSIS</h3>\r<pre>\r\r<strong>kern_return_t device_read_overwrite</strong>\r <strong>(mach_port_t</strong> <var>device</var>,\r <strong>dev_mode_t</strong> <var>mode</var>,\r <strong>recnum_t</strong> <var>recnum</var>,\r <strong>io_buf_len_t</strong> <var>bytes_wanted</var>,\r <strong>io_buf_pointer_t</strong> <var>data</var>,\r <strong>mach_msg_type_number_t</strong> <var>data_count</var><strong>);</strong>\r\r\r\r<strong>kern_return_t device_read_overwrite_request</strong>\r <strong>(mach_port_t</strong> <var>device</var>,\r <strong>mach_port_t</strong> <var>reply_port</var>,\r <strong>dev_mode_t</strong> <var>mode</var>,\r <strong>recnum_t</strong> <var>recnum</var>,\r <strong>io_buf_len_t</strong> <var>bytes_wanted</var>,\r <strong>io_buf_pointer_t</strong> <var>data</var><strong>);</strong>\r\r\r\r<strong>kern_return_t ds_device_read_reply_overwrite</strong>\r <strong>(mach_port_t</strong> <var>reply_port</var>,\r <strong>kern_return_t</strong> <var>return_code</var>,\r <strong>io_buf_len_t</strong> <var>data_count</var><strong>);</strong>\r</pre>\r<h3>PARAMETERS</h3>\r<dl>\r<p>\r<dt> <var>device</var> \r<dd>\r[in device send right]\rA device port to the device to be read.\r<p>\r<dt> <var>reply_port</var> \r<dd>\r[in reply receive (to be converted to send-once) right]\rThe port to \rwhich the reply message is to be sent.\r<p>\r<dt> <var>mode</var> \r<dd>\r[in scalar]\rI/O mode value. Meaningful options are:\r<dl>\r<p>\r<dt> <strong>D_NOWAIT</strong>\r<dd>\rDo not wait if data is unavailable.\r</dl>\r<p>\r<dt> <var>recnum</var> \r<dd>\r[in scalar]\rRecord number to be read.\r<p>\r<dt> <var>bytes_wanted</var> \r<dd>\r[in scalar]\rSize of data transfer.\r<p>\r<dt> <var>return_code</var> \r<dd>\r[in scalar]\rThe return status code from the read.\r<p>\r<dt> <var>data</var> \r<dd>\r[pointer to in array of bytes]\rData buffer to be overwritten.\r<p>\r<dt> <var>data_count</var> \r<dd>\r[out scalar, in for asynchronous form]\rNumber of returned data bytes.\r</dl>\r<h3>DESCRIPTION</h3>\r<p>\rThe <strong>device_read_overwrite</strong> system trap reads a sequence\rof bytes from a\rdevice object directly into the caller's address space. The\rmeaning of <var>recnum</var> as \rwell as the specific operation performed is device dependent.\r<h3>NOTES</h3>\r<p>\rThe <strong>device_read_overwrite_request</strong> and <strong>device_read_reply_overwrite</strong>\rcalls may be removed from the interface in favor of new asynchronous support.\r<h3>RETURN VALUES</h3>\r<p>\rOnly generic errors apply.\r<h3>RELATED INFORMATION</h3>\r<p>\rFunctions:\r<a href="device_read.html"><strong>device_read</strong></a>,\r<a href="device_read_inband.html"><strong>device_read_inband</strong></a>,\r<a href="device_reply_server.html"><strong>device_reply_server</strong></a>.\r |