Re: VFS locking: f_pos thread-safe ?

From: Andries Brouwer
Date: Fri Feb 06 2004 - 15:56:07 EST


On Fri, Feb 06, 2004 at 04:12:24AM -0300, Werner Almesberger wrote:

> I'm trying to figure out how all the locking in VFS and friends
> works, and I can't quite explain to myself how f_pos is kept
> consistent with concurrent readers.
>
> Section 2.9.7 of the "Austin" draft of IEEE Std. 1003.1-200x,
> 28-JUL-2000, says:
>
> "[...] read( ) [...] shall be atomic with respect to each other
> in the effects specified in IEEE Std. 1003.1-200x when they
> operate on regular files. If two threads each call one of these
> functions, each call shall either see all of the specified
> effects of the other call, or none of them."

The 2003 version can be found at

http://www.opengroup.org/onlinepubs/007904975/toc.htm
http://www.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_09.html

Andries
-
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/