On Wed, 8 Oct 2003, Bruce M Simpson wrote: BMS>On Wed, Oct 08, 2003 at 11:51:06AM +0200, Harti Brandt wrote: BMS>> You need to lock when reading if you insist on consistent data. Even a BMS>> simple read may be non-atomic (this should be the case for 64bit BMS>> operations on all our platforms). BMS> BMS>Or keep a generation count to detect pre-emption (the devstat code does BMS>this, amongst other things), and try again if you lost the race. BMS> BMS>Or insist on atomic reads, which must complete and must not be pre-empted BMS>by definition (although the SMP case is/can be different!).
That does not help if the writes are semantically not atomic: foo = data; foo &= mask; harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private [EMAIL PROTECTED], [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"