Jens Alfke wrote: > A read-modify-write cycle on an address in main memory is intrinsically > _not_ atomic on a multiprocessor system, not unless the CPU goes through > some expensive efforts to make it so (cache invalidation, bus locking, > etc.)
Most modern CPUs have caches, and any _normal_ memory write already requires that the CPU takes ownership of a cache line. And once it has ownership, the read-modify-write cycle is trivial. Atomic operations are somewhat slower than normal ones because they often imply a memory barrier, but they are very slow only if you do them in uncached memory. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users