summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-10 11:36:23 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-11 07:37:58 +0200
commitb2dbb634eccc4132eb839a0ed5ab09c7b3bd992e (patch)
treef8ceced2aa2efa35f9a208a9279bcf5b95ea03e5 /cpukit/score/include
parentposix: Validate affinity sets by the scheduler (diff)
downloadrtems-b2dbb634eccc4132eb839a0ed5ab09c7b3bd992e.tar.bz2
score: Remove CPU_set_Control
Use Processor_mask instead. Update #2514.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/cpuset.h63
-rw-r--r--cpukit/score/include/rtems/score/cpusetimpl.h129
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h1
-rw-r--r--cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h5
-rw-r--r--cpukit/score/include/rtems/sysinit.h1
5 files changed, 3 insertions, 196 deletions
diff --git a/cpukit/score/include/rtems/score/cpuset.h b/cpukit/score/include/rtems/score/cpuset.h
deleted file mode 100644
index 564f4a5efb..0000000000
--- a/cpukit/score/include/rtems/score/cpuset.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * @file rtems/score/cpuset.h
- *
- * @brief Information About the CPU Set
- *
- * This include file contains all information about the thread
- * 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.
- */
-
-#ifndef _RTEMS_SCORE_CPUSET_H
-#define _RTEMS_SCORE_CPUSET_H
-
-#include <rtems/score/basedefs.h>
-
-#include <sys/cpuset.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup ScoreCpuset SuperCore CPU Set
- *
- * @ingroup Score
- *
- * This handler encapsulates functionality which is used in the management
- * of thread's CPU set.
- */
-/**@{*/
-
-/**
- * The following defines the control block used to manage the cpuset.
- * The names do not include affinity in the front in case the set is
- * ever used for something other than affinity. The usage in thread
- * uses the attribute affinity such that accesses will read
- * thread->affinity.set.
- */
-typedef struct {
- /** This is the size of the set */
- size_t setsize;
- /** This is the preallocated space to store the set */
- cpu_set_t preallocated;
- /** This is a pointer to the set in use */
- cpu_set_t *set;
-} CPU_set_Control;
-
-/**@}*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RTEMS_SCORE_CPUSET_H */
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/cpusetimpl.h b/cpukit/score/include/rtems/score/cpusetimpl.h
deleted file mode 100644
index 1cb71d6169..0000000000
--- a/cpukit/score/include/rtems/score/cpusetimpl.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * @file
- *
- * @brief Implementation Helper for CPU Set
- *
- * This file contains the implementation helpers inlines and prototypes for
- * CPU set methods.
- */
-
-/*
- * 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.
- */
-
-#ifndef _RTEMS_SCORE_CPUSETIMPL_H
-#define _RTEMS_SCORE_CPUSETIMPL_H
-
-#include <rtems/score/cpuset.h>
-#include <rtems/score/smp.h>
-
-#include <limits.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Determine If the CPU Set if Valid
- *
- * This routine validates a cpuset size corresponds to the system
- * correct size, that at least one valid cpu is set and that no invalid
- * cpus are set.
- *
- * @param[in] cpuset is the cpuset to validate
- * @param[in] setsize is the number of CPUs in the cpuset
- *
- * @return true if the set is valid
- */
-bool _CPU_set_Is_valid( const cpu_set_t *cpuset, size_t setsize );
-
-/**
- * @brief Print the CPU Set
- *
- * This routine will print the value of the given cpuset.
- *
- * @param[in] description is a string to print before the value.
- * @param[in] cpuset is the cpuset to validate
- */
-void _CPU_set_Show( const char *description, const cpu_set_t *cpuset);
-
-/**
- * @brief Print the Default CPU Set
- *
- * This routine will print the value of the default cpuset.
- *
- * @param[in] description is a string to print before the value.
- */
-void _CPU_set_Show_default( const char *description );
-
-/**
- * @brief Obtain the Default CPU Set
- *
- * This routine returns the default cpuset for this system.
- *
- * @return a pointer to the default cpuset.
- */
-const CPU_set_Control *_CPU_set_Default(void);
-
-/**
- * @brief Obtain the Maximum Number of CPUs Representable in CPU Set
- *
- * This routine returns maximum number of CPUs that can be represented
- * in the @a setsize specified.
- *
- * @return the number of representable cores in the cpuset
- */
-RTEMS_INLINE_ROUTINE size_t _CPU_set_Maximum_CPU_count( size_t setsize )
-{
- return setsize * CHAR_BIT;
-}
-
-/**
- * @brief Is this CPU Set Large Enough?
- *
- * This method can be used to determine if a particular cpuset is
- * large enough for the number of CPUs in the system.
- *
- * @param[in] setsize is the number of CPUs in the cpuset
- *
- * @return true if the @a setsize is sufficient
- */
-RTEMS_INLINE_ROUTINE bool _CPU_set_Is_large_enough(
- size_t setsize
-)
-{
- return _CPU_set_Maximum_CPU_count( setsize ) >= _SMP_Get_processor_count();
-}
-
-/**
- * @brief Fill in CPU_set_Control
- *
- * This method fills in a CPU_set_Control based upon a cpu_set_t and
- * size information.
- *
- * @param[in] cpuset is the cpuset to validate
- * @param[in] setsize is the number of CPUs in the cpuset
- */
-static inline void _CPU_set_Set(
- size_t setsize,
- cpu_set_t *cpuset,
- CPU_set_Control *set
-)
-{
- set->set = &set->preallocated;
- set->setsize = setsize;
- CPU_COPY( cpuset, set->set );
-}
-
-/**@}*/
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-/* end of include file */
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index 85fcace760..89b24415df 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -22,7 +22,6 @@
#include <rtems/score/scheduler.h>
#include <rtems/score/assert.h>
-#include <rtems/score/cpusetimpl.h>
#include <rtems/score/priorityimpl.h>
#include <rtems/score/smpimpl.h>
#include <rtems/score/status.h>
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h b/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h
index e5eb916133..6ae7ac5e76 100644
--- a/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h
+++ b/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h
@@ -22,7 +22,8 @@
#include <rtems/score/schedulerpriority.h>
#include <rtems/score/schedulersmp.h>
#include <rtems/score/schedulerprioritysmp.h>
-#include <rtems/score/cpuset.h>
+
+#include <sys/cpuset.h>
#ifdef __cplusplus
extern "C" {
@@ -168,7 +169,7 @@ typedef struct {
/**
* Structure containing affinity set data and size
*/
- CPU_set_Control Affinity;
+ cpu_set_t affinity;
} Scheduler_priority_affinity_SMP_Node;
/** @} */
diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h
index 7ab3d0b631..535fb98e2c 100644
--- a/cpukit/score/include/rtems/sysinit.h
+++ b/cpukit/score/include/rtems/sysinit.h
@@ -31,7 +31,6 @@ extern "C" {
#define RTEMS_SYSINIT_INITIAL_EXTENSIONS 000300
#define RTEMS_SYSINIT_MP_EARLY 000301
#define RTEMS_SYSINIT_DATA_STRUCTURES 000302
-#define RTEMS_SYSINIT_CPU_SET 00030d
#define RTEMS_SYSINIT_MP 00030e
#define RTEMS_SYSINIT_USER_EXTENSIONS 000320
#define RTEMS_SYSINIT_CLASSIC_TASKS 000340