[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] 3.10 release objectives

From: Eric S. Raymond
Subject: Re: [gpsd-dev] 3.10 release objectives
Date: Thu, 17 Oct 2013 06:01:56 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Gary E. Miller <address@hidden>:
> > It is a race between dropping root and
> > reading /dev/pps0 which only root can read.  So it is likely very
> > dependent on the number of cores you have.
> I added code to catch when the race fails.  It announces the failure
> and then adds some sanity checks to fail gracefuly.  I also found
> some logic errors adding during some previous refactoring.

I've added a thread-locked semaphore that should prevent this race.
Just before privilege dropping the code stalls until either there
are no KPPS threads in an uninitialized state or a long timeout

Please review and test; I don't seem to have kernel PPS, so I can't.

> I want to sleep on this a bit and see what else I can improve, but at 
> least it works a lot better now.

I think my fix solves your one race condition.  But there's a more
general problem with kernel PPS vs. hotplugging which, now that the
GR-601W exists, is no longer purely theoretical.

I'm going to run some tests here and then post about it.
                <a href="";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]