On Wed, Apr 9, 2014 at 1:34 PM, Hal Murray <hmur...@megapathdsl.net> wrote:

>
> > But I think you over looked one point that makes this project easier:  We
> > KNOW 100% for certain that the interrupts happen only once per second.
>  So
> > the foreground code knows for certain it has exclusive access to shared
> > variables for a given period of time.  There is zero chance of a problem
> in
> > the next .999 seconds after an interrupt.
>
> Actually, you don't know that.  You know that's the way it's supposed to
> work, but there are all sorts of ways that things can (and do) screw up and
> making that sort of assumption can lead to problems that are very hard to
> debug.
>

So create a semaphore that says who owns the variable. Or, better still, us
a message-passing executive.

-- 
Brian Lloyd, WB6RQN/J79BPL
706 Flightline Drive
Spring Branch, TX 78070
br...@lloyd.com
+1.916.877.5067
_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to