[time-nuts] First success with very simple, very low cost GPSDO, under $8

Brian Lloyd brian at lloyd.com
Wed Apr 9 20:17:24 UTC 2014


On Wed, Apr 9, 2014 at 1:34 PM, Hal Murray <hmurray at 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
brian at lloyd.com
+1.916.877.5067



More information about the Time-nuts_lists.febo.com mailing list