korli@xxxxxxxxxxxxxxxx wrote: > Author: korli > Date: 2011-08-20 19:46:50 +0200 (Sat, 20 Aug 2011) > New Revision: 42648 > Changeset: https://dev.haiku-os.org/changeset/42648 > Ticket: https://dev.haiku-os.org/ticket/7872 > > Modified: > haiku/trunk/src/system/kernel/timer.cpp > Log: > Disable interrupts when updating real time clock. Fixes #7872. Seems to have > been introduced in r42116. > > Modified: haiku/trunk/src/system/kernel/timer.cpp > =================================================================== > --- haiku/trunk/src/system/kernel/timer.cpp 2011-08-20 14:29:06 UTC (rev > 42647) > +++ haiku/trunk/src/system/kernel/timer.cpp 2011-08-20 17:46:50 UTC (rev > 42648) > @@ -94,7 +94,7 @@ > per_cpu_real_time_clock_changed(void*, int cpu) > { > per_cpu_timer_data& cpuData = sPerCPU[cpu]; > - SpinLocker cpuDataLocker(cpuData.lock); > + InterruptsSpinLocker cpuDataLocker(cpuData.lock); > > bigtime_t realTimeOffset = rtc_boot_time(); > if (realTimeOffset == cpuData.real_time_offset) The patch attached to ticket #7872 is actually more correct. Although the BeBook doesn't document call_all_cpus() particularly well, I think it is reasonable to assume that the given function is invoked with interrupts disabled also on UP machines. I'd rather see call_all_cpus() fixed than have this work-around everywhere. CU, Ingo