C11 Re: [PATCH 3/6] termios: Use C11 mutex for input/output

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Dec 15 06:32:24 UTC 2016


On 14/12/16 22:43, Peter Dufault wrote:
> Can someone help clarify the issue?
>
> Is this a “required compiler to build RTEMS” question?  That is, are 
> the compilers currently required to build the RTEMS Sebastian modified 
> guaranteed to support C11 mutexes, and is it desirable to be more 
> conservative about what compiler is needed?
>
> If C11 mutexes guarantee what Sebastian needs and unknown compiler 
> support isn’t required then allow it.
>
> Note that I haven’t researched this, I’m just guessing that the C11 
> mutexes may guarantee less than the classic semaphores, and are being 
> implemented at the compiler level, and that this minimum level of 
> compiler support is OK for building RTEMS.

The C11 support is not a compiler issue. The <threads.h> is a part of 
the C standard library and for RTEMS this header file is provided by Newlib:

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/threads.h;h=9fb08b03d1eb20024c0d680a7924336ec7ea57bb;hb=HEAD

This header file is compatible to C89 (with the next Newlib release). I 
imported several parts of the FreeBSD <sys/cdefs.h> for this purpose.

The C11 <threads.h> provided functions are implemented in RTEMS:

https://git.rtems.org/rtems/tree/cpukit/libstdthreads

-- 
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 mailing list