Support for non-blocking block reads/writes

Ben Laughton


Overview
========

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.


Changes
=======

Flags
-----

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

IOCtl
-----

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:
DeviceFS_BadIOCtlReasonCode
DeviceFS_BadIOCtlParameter

GBPB
----

gbpb_get:
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.

gbpb_put:
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.
