Tamas Rudnai wrote: >> the point is that "atomic" is not a neutral word, have a precise meaning. >> If he would say "move is fast" or "move is simpler" that is ok. >> But "atomic"... >> > > Yes, that's true, "atom" I think is a greek word? And has the meaning of > "undividable"? But just a century ago turned out that atom is dividable, so > what is undividable? MOVLW 0x00 takes 4 FOSC cycles, so is that instruction > atomic? :-) > > In my point of view http://en.wikipedia.org/wiki/Atomic_operation > everything is atomic which cannot be distracted by > interrupting it. So if two concurrent MOVE you do on the same source file at > the very same time, only one of them will be succeed. In that script we > could even put an error handler if the renamed file is there after the > command (IF NOT EXIST ... GOTO ERROR - or something like that). With COPY > and DEL you cannot achive the same goal as COPY+DEL (as doing the same as > MOVE) are NOT atomic because another instantiation of the script can make > the copy in the meanwhile before the DEL. If you intended you rewrite it to > a networked environment with COPY+DEL will fail randomly for sure. > > Anyway, it's highly off now, I was just intended to show a possible > workaround of the preprocessor problem. > > Tamas > > > On Thu, Apr 10, 2008 at 4:48 PM, Nicola Perotto > wrote: > > >> Hi, >> >> Alan B. Pearce wrote: >> >>>> Uhm... are you sure that MOVE is atomic??? On ntfs and fat32? I >>>> seriously doubt of this... and this can be, rarely, a problem! >>>> We are speaking on m$ file systems... >>>> >>>> >>> It certainly takes less time than copying a file, because the only thing >>> that moves is the directory entry. The file itself stays in the same >>> position on the disk. >>> >>> Now whether or not the new directory entry is written, with its pointers >>> intact before deleting the old entry is another matter I do not have >>> >> info >> >>> about. >>> >>> >> the point is that "atomic" is not a neutral word, have a precise meaning. >> If he would say "move is fast" or "move is simpler" that is ok. >> But "atomic"... >> >> PS: i'm sorry but my english is very bad and i'm not able to argoment so >> well... >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> >> > > > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist