Re: VFS locking: f_pos thread-safe ?

Joel Becker
2004-02-07T01:36:51Z

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@oracle.com
Phone: (650) 506-8127