RE: [boost] Porting to SCO Unix

John Maddock <john@johnmaddock.co.uk> wrote:
The following tests in libs/config/configure produce incorrect results:
** checking for pthread_exit in -lpthread... no This test tries to compile a C source file that prototypes "pthread_exit" as "char pthread_exit();". But my compiler driver always adds "-include <...>/pthread.h" to the command line, which includes a different, conflicting prototype for this function. I think the test ought to include <pthread.h> instead.
Grrrrr, I used the standard autoconf macros for checking this, if I get the time I'll try and write my own version that does what you suggest.
** checking pthread_yield... no This is correct, but I do have a pthread_yield_np() function, maybe we should look for it, too.
It's up to the thread lib guys to use it (or not), maybe you could hassle the authors of the thread lib you are using to provide a standard function signature?
pthread_yield is non-standard; you should use sched_yield instead (if at all). See <http://groups.google.com/groups?selm=3ecbb70c%40usenet01.boi.hp.com>

pthread_yield is non-standard; you should use sched_yield instead (if at all). See <http://groups.google.com/groups?selm=3ecbb70c%40usenet01.boi.hp.com>
I should have made that clearer: we do use sched_yield when we can, pthread_yield is a fallback. John.
participants (2)
-
Ben Hutchings
-
John Maddock