[Vm-dev] linux build stability
Igor Stasenko
siguctua at gmail.com
Thu Feb 3 07:37:23 UTC 2011
On 3 February 2011 00:07, David T. Lewis <lewis at mail.msen.com> wrote:
>
>>
>> Or some concurrency issue, because hearbeat runs in separate thread
>> than vm thread.
>
> Hmmm... That's a thought. This is a complete shot in the dark, but the
> following does not look thread safe to me:
>
> static void
> high_performance_tick_handler(int sig, struct siginfo *sig_info, void *context)
> {
> static int tickCheckInProgress;
>
> if (tickCheckInProgress) return;
>
> tickCheckInProgress = 1;
> checkHighPriorityTickees(ioUTCMicroseconds());
> tickCheckInProgress = 0;
> }
>
> This should be using a mutex, no?
>
well, at least make it volatile.
Also, i saw Eliot introduced CAS primitive, it could be used here as well.
> Dave
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Vm-dev
mailing list