std::thread error

Sebastian Huber sebastian.huber at
Tue Sep 29 05:51:22 UTC 2015

On 28/09/15 23:52, Jeff Webb wrote:
> To me, it looks like this:
> libgcov-interface.c includes gthr.h
> gthr.h includes gthr-default.h.
> gthr-default.h includes pthread.h
> newlib/libc/include/pthread.h is found first, which does not include 
> sched.h
> after including pthread.h, gthr-default.h tries to reference sched_yield
>   i.e.: "__gthrw(sched_yield)"
> gthr-default.h then includes sched.h later in the file.
> sched.h defines sched_yield, but it is too late.
> Of course, I could easily be confused. 

The --enable-threads=posix is largely untested. I never used it myself. 
There is a probably a bug in the Newlib <pthread.h>, see also

"Inclusion of the <pthread.h> header will make visible symbols defined 
in the headers <sched.h> and <time.h>."

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the users mailing list