Messages in this thread | | | Subject | Re: file offset corruption on 32-bit machines? | From | Bryan Henderson <> | Date | Fri, 11 Apr 2008 14:29:21 -0700 |
| |
>What is the difference between doing: > >threadA: seek(positionA) >threadB: seel(positionB) >threadA: write >threadB: write > >versus > >threadA: seek(posisionA) but only set half the 64bits >threadB: seek(positionB) set all 64bits >threadA: complete seek operation setting the other half of the bits >threadA: write >threadB: write > >either way you end up writing to the wrong file location
Only if you make an assumption about what this program considers the right location. One difference is that in the first case, data gets written only at a place to which the program seeked, while in the second, it gets written to a totally illogical place. Another is that in the first, the data gets written as specified in standards and in the second, it doesn't. I can imagine a program that would be satisfied with the first and not the second, and for such a program, I cannot use the word "incorrect" or "broken" or say the programmer doesn't understand shared resources.
-- Bryan Henderson IBM Almaden Research Center San Jose CA Filesystems
| |