[PATCH] [RTEMS] Update RTEMS thread model
sebastian.huber at embedded-brains.de
Fri Jul 31 06:44:59 UTC 2015
On 31/07/15 08:28, Chris Johns wrote:
> On 31/07/2015 4:11 pm, Sebastian Huber wrote:
>> For synchronization objects use the self-contained objects available via
>> Newlib <sys/lock.h>.
>> Enable the C++11 threads using <pthread.h>. So, the threads are only
>> supported in case the POSIX API is enabled in RTEMS. In the long run
>> support for thread join and detach should be added to the API
>> independent RTEMS services.
> Is this for 4.12 ?
This is just a proof-of-concept patch, but it would be nice to include
this in the next release along with the C11 threads support.
> What happens if I build RTEMS with --disable-posix ? If I use locale in
> C++ it pulls in the 'once' support which pulls in this file which would
> give unresolved externals.
The pthread_once() is always available just like the POSIX keys. If you
use std::thread, however, with --disable-posix, then you get unresolved
> There is a PR against me for libstdc++ not
> checking the return code. Is it time for the --enable-posix option to go
> and to always nave it enabled ?
The not checked return values is still an issue, but this is a case by
case issue. For example the status of __gthread_create() is checked, but
not the status of the POSIX key functions.
The criterion for me to get rid of the --disable-posix option is a
constructor based initialization (linker sets).
> I feel 'tiny' support should be by not linking rather than configure magic.
> devel mailing list
> devel at rtems.org
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 embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel