npth finds pthread_mutex_timedlock() which android does not have

Marcus Brinkmann marcus.brinkmann at
Tue Feb 28 17:32:16 CET 2012

On 02/20/2012 11:16 PM, Hans-Christoph Steiner wrote:

> Turns out there is another issue with npth on Android.  npth_yield is a
> macro for pthread_yield, which Android does not seem to have.  I cannot
> find another confirmation of this besides pthread_yield() not being any
> headers.

While I find the disregard for standard compliance in Android deeply 
disturbing, in this case the right fix is to remove npth_yield entirely 
(which should have been a function anyway, as it needs to release the 
global lock temporarily).  yield is considered harmful, and I changed 
the only place where it is called in gnupg with a sleep (well, there are 
some more calls in the windows CE port which will eventually be taken 
care of).

npth: c30634abebb287f56a6a2480b4bbd2ffc166dd4d
gnupg: 8f8c6594147608b1021c16fc3561feb96da5d55a


More information about the Gnupg-devel mailing list