[Top][All Lists]

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

Re: [gpsd-dev] [PATCH] Use pselect() to reduce wakeups and avoid race co

From: Eckhart Wörner
Subject: Re: [gpsd-dev] [PATCH] Use pselect() to reduce wakeups and avoid race conditions
Date: Sat, 14 Jan 2012 00:32:48 +0100
User-agent: KMail/4.8 rc2 (Linux/3.2.0-8-generic; KDE/4.7.97; x86_64; ; )

Hi Dave,

a race condition lead to us giving more or less the same answer. ;-)

Am Freitag, 13. Januar 2012, 14:41:17 schrieb Dave Platt:
> [This particular problem bit me badly when I was debugging software
>  which was running on an old embedded Linux kernel, which did not
>  implement pselect() in the kernel.  Instead, glibc has a "convenience
>  implementation" of pselect() - which simply changes the signal mask
>  and calls select().  In other words, the glibc code re-introduces
>  the very timing race condition that pselect() was intended to cure...
>  and it resulted in our system hanging at boot in an unpredictable
>  fashion.]

Thanks for explaining this; this is exactly the reason why there is 
compatibility code that still uses select() with a timeout. Using the 
userspace implemention of pselect() probably leads to worse results (hangs) 
than the existing code.


reply via email to

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