[PATCH 3/3] score: Add SMP support to the cache manager

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 7 06:48:39 UTC 2014


On 2014-07-04 17:12, Daniel Cederman wrote:
>  > This limits the API to the default cpu_set_t.  Other routines like
>  > pthread_setaffinity_np() don't have this limitation.
>
> I looked at pthread_setaffinity_np() and got a bit confused. I see that it
> takes both a pointer to a cpu_set_t and the size of the cpu set. It forwards it
> to _Scheduler_Set_affinity which requires __RTEMS_HAVE_SYS_CPUSET_H__ to be
> defined. If this is defined then _CPU_set_Handler_initialization checks that
> the number of cpus is less than CPU_SETSIZE. In newlib this is defined to 32
> and is used to size the cpu_set_t struct. So why is the size needed for
> pthread_setaffinity_np if the number of cpus cannot exceed a hardcoded
> constant? I recall that there was a discussion on the list about cpu sets, but
> I'm not finding anything searching.

There are CPU set functions that support an arbitrary number of processors, 
just look at the Linux manpage or <sys/cpuset.h>.  This is normally only useful 
on NUMA systems, but who knows what will be used for real-time systems in the 
future.

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