Intended semantics for syscalls function _read?

Eric Blake
Mon Nov 21 15:06:00 GMT 2016

On 11/21/2016 07:16 AM, wrote:
>    Hello list,
> The documentation of this function does not describe how this function is to behave.
> Is it blocking, or can it also be non-blocking.
> What is the meaning of the return value? Or is it intentionally left ambiguous?

Your _read() function is supposed to behave similarly to the
POSIX-defined read(2) function:

> Can I use (man 2) read in a non-blocking way? Or is there an other way?

If you've properly implemented fcntl(2), then you can set O_NONBLOCK to
get non-blocking reads.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Newlib mailing list