This is the mail archive of the
mailing list for the newlib project.
Re: Patch - Add pthread affinity for RTEMS
- From: Gedare Bloom <gedare at rtems dot org>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Cc: "newlib at sourceware dot org" <newlib at sourceware dot org>, Chris Johns <chrisj at rtems dot org>, "Sebastian dot Huber at embedded-brains dot de" <Sebastian dot Huber at embedded-brains dot de>
- Date: Fri, 22 Nov 2013 09:42:12 -0500
- Subject: Re: Patch - Add pthread affinity for RTEMS
- Authentication-results: sourceware.org; auth=none
- References: <528F6A68 dot 1070607 at oarcorp dot com>
I have two quite minor comments.
1) Add a space after the comma in newlib/libc/include/pthread.h
+ (pthread_attr_t *__attr,size_t __cpusetsize,
2) In types.h, why relocate the guardsize definition and not just put
the affinity either with guardsize at its current location, or add a
new ifdef block for affinity? Presumably if another project cares to
use the pthread_setaffinity, they could update the ifdef for affinity
and not pull in guardsize. I'm not certain if it matters much.
On Fri, Nov 22, 2013 at 9:30 AM, Joel Sherrill
> This patch follows up on the recent addition of the
> RTEMS specific cpuset.h and adds GNU/Linux style
> pthread affinity APIs to pthread.h.
> Sebastian.. we think the guards follow your recommendations.
> OK to commit?
> 2013-11-22 Jennifer Averett <email@example.com>
> * libc/include/pthread.h (pthread_attr_setaffinity_np,
> pthread_attr_getaffinity_np, pthread_setaffinity_np,
> pthread_getaffinity_np, pthread_getattr_np): Add pthread obtain
> attribute and SMP affinity methods to RTEMS for compatibility
> with GNU/Linux.
> * libc/include/sys/types.h: Add cpuset to pthread_attr_t for RTEMS.
> Joel Sherrill, Ph.D. Director of Research & Development
> joel.sherrill@OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985