/** * @file * * @ingroup ScoreCpuset * * @brief Routines to Control a CPU Set. */ /* * COPYRIGHT (c) 2014. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.org/license/LICENSE. */ #if HAVE_CONFIG_H #include "config.h" #endif #ifdef __RTEMS_HAVE_SYS_CPUSET_H__ #include #include #include #include static CPU_set_Control cpuset_default; /* * _CPU_set_Handler_initialization */ void _CPU_set_Handler_initialization() { int i; int max_cpus; /* We do not support a cpu count over CPU_SETSIZE */ max_cpus = _SMP_Get_processor_count(); /* This should never happen */ _Assert( max_cpus <= CPU_SETSIZE ); /* Initialize the affinity to be the set of all available CPU's */ cpuset_default.set = &cpuset_default.preallocated; cpuset_default.setsize = sizeof( *cpuset_default.set ); CPU_ZERO_S( cpuset_default.setsize, &cpuset_default.preallocated ); for (i=0; i