Commit a95b8b9f authored by Kevin Bracey's avatar Kevin Bracey
Browse files

ARTtmp branch folded in

parent f34ff997
Support for non-blocking block reads/writes
Ben Laughton
Support has been added to allow block reads and writes (using OS_GBPB) to be
non-blocking. The existing blocking API is not unchanged so full backwards
compatibility is maintained.
Non-blocking operation for a stream is enabled using a new IOCtl. This IOCtl
can also be used to read the blocking status of a stream. When streams are
first opened they are always in blocking mode by default.
A new IOCtl group (&ff) has been created for performing miscellaneous
operations on a stream. Reason code 1 in this group reads/writes the
blocking status of a stream.
This new IOCtl group is dealt with in DeviceFS; IOCtls in this group are not
passed on to device drivers.
A new flag has been added to the flags word in the file structure:
bit 29 ff_NonBlocking 0:Non-blocking mode disabled for this file
1:Non-blocking mode enabled for this file
The args_ioctl routine has been changed to recognise with the new IOCtl group
and a couple of routines have been added to deal with this group:
ioctl_miscop ioctl_miscop_nonblock
Two new errors have been added which relate to the IOCtl handing:
When in non-blocking mode, if gbpb_get cannot get the complete number of
requested bytes it returns with number of bytes not done in R3.
When in non-blocking mode, if gppb_put cannot output all the bytes it was
told to send it returns with the number of bytes not done in R3 and the C
flag set.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment