Proposed Pthread affinity APIs
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Nov 12 18:32:24 UTC 2013
On 11/12/2013 03:11 PM, Joel Sherrill wrote:
> On 11/12/2013 2:27 AM, Sebastian Huber wrote:
>> >On 2013-11-11 21:30, Jennifer Averett wrote:
>>> >>@@ -206,6 +206,24 @@
>>> >> int _EXFUN(pthread_attr_setguardsize,
>>> >> (pthread_attr_t *__attr, size_t __guardsize));
>>> >>
>>> >>+#if defined(__USE_GNU) && defined(__rtems__)
>>> >>+/* POSIX thread APIs beyond the POSIX standard but provided in RTEMS
>>> >>+ * for compatibility with GNU/Linux.
>>> >>+ */
>> >
>> >Who is supposed to define this __USE_GNU?
>> >
> The application or implementation before including
> the header files. This is common practice and how
> it is done in /usr/include/pthread.h on GNU/Linux.
>
> http://man7.org/linux/man-pages/man3/pthread_attr_setaffinity_np.3.html
>
> There are also other constants like thus __USE_XOPEN2K, __USE_BSD,
> and __USE_XOPEN2K8 are pretty common. It is similar to the STDC
> one but that's usually tripped by gcc, while these are application
> choices on what library API standard to adhere to.
>
> Sorry to sound pendantic but this is the common practice.
Yes, exactly this is why I asked. In the man page you have:
*#define _GNU_SOURCE */* See feature_test_macros(7) */
*#include <pthread.h>*
You use __USE_GNU.
--
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