Re: [linux-audio-dev] Behaviour of write() in blocking/non-blocking mode

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Behaviour of write() in blocking/non-blocking mode
From: Greg Ward (gward_AT_python.net)
Date: Fri Nov 29 2002 - 19:33:59 EET


On 29 November 2002, guenter geiger said:
> You can rely on the fact that blocking write will write the whole
> buffer to the sound device. (Unless something bad happens).

Ahh, OK thanks. That's a bit different from the conventional semantics
for blocking write(), but that's no big deal. Just more work for OSS
driver writers and less work for application writers.

Two more questions though: what is "something bad", and if it happens,
will write() just return early without consuming the whole buffer, or
will it return -1 to indicate an error?

> For non-blocking mode, you can rely that the call will return immediatly
> instead of waiting to be able to write the rest of the buffer.

That is what I would expect and what I have observed.

Thanks --

        Greg

-- 
Greg Ward <gward_AT_python.net>                         http://www.gerg.ca/
Pointers are Arrays; Code is Data; Time is Money


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Nov 29 2002 - 19:49:04 EET