Re: VFS locking: f_pos thread-safe ?
From: Werner Almesberger
Date: Fri Feb 06 2004 - 14:56:52 EST
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@xxxxxxxxxxxxxxx /
/_http://www.almesberger.net/____________________________________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/