Re: VFS locking: f_pos thread-safe ?

From: Joel Becker
Date: Fri Feb 06 2004 - 20:39:19 EST


On Fri, Feb 06, 2004 at 08:05:48PM +0100, Matthias Urlichs wrote:
> thread A reads M @N thread B reads M @N file pointer ends up as N+M
> thread A reads M @N thread B reads M @M+N file pointer ends up as N+2M
> thread A reads M @M+N thread B reads M @N file pointer ends up as N+2M
>
> With your description,
> thread A reads M @M+N thread B reads M @M+N file pointer ends up as N+2M

I didn't mean the last. I was just writing English, and figured
everyone would know what I meant. Obviously, the first read() in starts
@M.

Joel

--

Life's Little Instruction Book #198

"Feed a stranger's expired parking meter."

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127
-
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/