Re: VFS locking: f_pos thread-safe ?

Werner Almesberger
2004-02-06T19:55:09Z

Matthias Urlichs wrote:
> but it's NOT AT ALL obvious to a "normal" application programmer.

It gets worse. From the same draft (perhaps someone who has the final
version could comment ?), in the rationale for read():

| The standard developers considered adding atomicity requirements to a
| pipe or FIFO, but recognized that due to the nature of pipes and FIFOs
| there could be no guarantee of atomicity of reads of {PIPE_BUF} or any
| other size that would be an aid to applications portability.

But then

| I/O is intended to be atomic to ordinary files and pipes and FIFOs.

Now, what exactly does "intended" mean ?

Of course, in this part, they only talk about data staying together,
not whether it can get duplicated, or effects on f_pos.

- Werner

--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/