Motorola MCP750 Specifications Page 302

  • Download
  • Add to my manuals
  • Print
  • Page
    / 344
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 301
D
evice Driver Programming
17-26
For an I/O device that performs programmed I/O or a user-level device driver that does
intermediate buffer copying, the user-level driver does not need to use physical addresses
to describe the user’s I/O buffer. In such cases, the I/O routines of user-level drivers
written by Concurrent Computer Corporation personnel are still required to accept a
udbuf_t structure to describe the I/O buffer; however, only the virtual address portion of
the structure is used. Other user-level device drivers are not required to use the udbuf_t
structure in such cases.
The aread and awrite routines allow an application to indicate whether or not the
status of an I/O operation is important. When the application asks for status information, it
must check the status of the I/O operation until the I/O completion status is returned. The
writer of a user-level driver must maintain status for aread or awrite operations until
the I/O completion status is returned. If the application indicates that status information is
not important, the user-level driver should discard status or allow it to be overwritten as
soon as the I/O operation is complete.
The asynchronous I/O support routines include aread, awrite, acheck, and await.
They are described in the sections that follow.
The aread Routine 17
The driver’s aread routine allows a user process to perform an asynchronous read of data
from a particular device.
Specification
int xx
_aread(
dev_desc
,
buff_desc
,
count
,
req_id)
int dev_desc
;
udbuf_t *buff_desc
;
int count
;
int *req_id
;
Parameters
dev_desc the identifier for the device from which data are to be read. This identifier is
returned by the driver’s open routine.
buff_desc a pointer to the user I/O buffer that describes the physical locations into which
data are to be read
count the number of bytes to be read
req_id a pointer to the location to which the request identifier of the asynchronous
read operation is returned. The user process can use this identifier to obtain the
status of the operation. If req_id contains a null pointer, information about the
status of the request is not maintained. If req_id contains a pointer, the user-
level driver provides an identifier that the application must use to check the
status of the read request. (See “The acheck Routine” on page 17-28 and “The
await Routine” on page 17-29 for an explanation of the acheck and await
user-level driver routines. These routines can be supplied to allow users to
check the status of an asynchronous I/O request.)
Page view 301
1 2 ... 297 298 299 300 301 302 303 304 305 306 307 ... 343 344

Comments to this Manuals

No comments