[PATCH] Delete autotools probe for <sys/cpuset.h> and all references to feature macro
Joel Sherrill
joel at rtems.org
Sun May 22 23:04:49 UTC 2016
This was a transitional feature macro and recent tool verions always
have this header file. Remove as it is now obsolete.
---
cpukit/configure.ac | 7 --
cpukit/posix/include/rtems/posix/pthreadimpl.h | 2 +-
cpukit/posix/src/pthread.c | 34 ++++----
cpukit/posix/src/pthreadattrcompare.c | 30 +++----
cpukit/posix/src/pthreadcreate.c | 6 +-
cpukit/rtems/include/rtems/rtems/tasks.h | 4 -
cpukit/rtems/src/schedulergetprocessorset.c | 4 -
cpukit/rtems/src/taskgetaffinity.c | 3 -
cpukit/rtems/src/tasksetaffinity.c | 3 -
cpukit/score/include/rtems/score/cpuset.h | 4 -
cpukit/score/include/rtems/score/cpusetimpl.h | 3 -
cpukit/score/include/rtems/score/scheduler.h | 8 +--
cpukit/score/include/rtems/score/schedulerimpl.h | 4 -
cpukit/score/src/cpuset.c | 4 -
cpukit/score/src/cpusetprintsupport.c | 99 +++++++++++-----------
cpukit/score/src/schedulergetaffinity.c | 4 -
cpukit/score/src/schedulersetaffinity.c | 4 -
testsuites/psxtests/configure.ac | 3 -
testsuites/smptests/configure.ac | 4 -
testsuites/smptests/smpaffinity01/init.c | 12 ---
testsuites/smptests/smpscheduler02/init.c | 11 ---
testsuites/sptests/Makefile.am | 3 -
testsuites/sptests/configure.ac | 4 -
testsuites/sptests/spcpuset01/init.c | 13 ---
testsuites/sptests/spcpuset01/system.h | 2 -
testsuites/sptests/spcpuset01/test.c | 2 -
testsuites/sptests/spscheduler01/init.c | 4 -
27 files changed, 82 insertions(+), 199 deletions(-)
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 054e60e..8bda761 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -116,7 +116,6 @@ RTEMS_CHECK_FUNC([pthread_getaffinity_np],[
RTEMS_CHECK_FUNC([pthread_getattr_np],[
#define _GNU_SOURCE
#include <pthread.h>])
-AC_CHECK_HEADERS([sys/cpuset.h])
# This was added to newlib in August 2014 to improve conformance.
# Disable use of internal definition if it is present.
@@ -249,12 +248,6 @@ RTEMS_CPUOPT([RTEMS_VERSION],
[RTEMS version string])
## Header file differences that need to be known in .h after install
-RTEMS_CPUOPT([__RTEMS_HAVE_SYS_CPUSET_H__],
- [test x"${ac_cv_header_sys_cpuset_h}" = x"yes"],
- [1],
- [indicate if <sys/cpuset.h> is present in toolset])
-
-## Header file differences that need to be known in .h after install
RTEMS_CPUOPT([__RTEMS_HAVE_DECL_SIGALTSTACK__],
[test x"${ac_cv_have_decl_sigaltstack}" = x"yes"],
[1],
diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h
index 16b0163..3627643 100644
--- a/cpukit/posix/include/rtems/posix/pthreadimpl.h
+++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h
@@ -165,7 +165,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Threads_Copy_attributes(
)
{
*dst_attr = *src_attr;
-#if defined(RTEMS_SMP) && defined(__RTEMS_HAVE_SYS_CPUSET_H__)
+#if defined(RTEMS_SMP)
_Assert(
dst_attr->affinitysetsize == sizeof(dst_attr->affinitysetpreallocated)
);
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 766ac01..a3cac22 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -76,11 +76,9 @@ pthread_attr_t _POSIX_Threads_Default_attributes = {
.cputime_clock_allowed = 1, /* cputime_clock_allowed */
#endif
.detachstate = PTHREAD_CREATE_JOINABLE, /* detachstate */
- #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
- .affinitysetsize = 0,
- .affinityset = NULL,
- .affinitysetpreallocated = {{0x0}}
- #endif
+ .affinitysetsize = 0,
+ .affinityset = NULL,
+ .affinitysetpreallocated = {{0x0}}
};
static bool _POSIX_Threads_Sporadic_budget_TSR_filter(
@@ -280,20 +278,18 @@ User_extensions_Control _POSIX_Threads_User_extensions = {
*/
static void _POSIX_Threads_Manager_initialization(void)
{
- #if defined(RTEMS_SMP) && defined(__RTEMS_HAVE_SYS_CPUSET_H__)
- const CPU_set_Control *affinity;
- pthread_attr_t *attr;
-
- /* Initialize default attribute. */
- attr = &_POSIX_Threads_Default_attributes;
-
- /* Initialize the affinity to be the default cpu set for the system */
- affinity = _CPU_set_Default();
- _Assert( affinity->setsize == sizeof( attr->affinitysetpreallocated ) );
- attr->affinityset = &attr->affinitysetpreallocated;
- attr->affinitysetsize = affinity->setsize;
- CPU_COPY( attr->affinityset, affinity->set );
- #endif
+ const CPU_set_Control *affinity;
+ pthread_attr_t *attr;
+
+ /* Initialize default attribute. */
+ attr = &_POSIX_Threads_Default_attributes;
+
+ /* Initialize the affinity to be the default cpu set for the system */
+ affinity = _CPU_set_Default();
+ _Assert( affinity->setsize == sizeof( attr->affinitysetpreallocated ) );
+ attr->affinityset = &attr->affinitysetpreallocated;
+ attr->affinitysetsize = affinity->setsize;
+ CPU_COPY( attr->affinityset, affinity->set );
_Thread_Initialize_information(
&_POSIX_Threads_Information, /* object information table */
diff --git a/cpukit/posix/src/pthreadattrcompare.c b/cpukit/posix/src/pthreadattrcompare.c
index 4cc4098..6a3b625 100644
--- a/cpukit/posix/src/pthreadattrcompare.c
+++ b/cpukit/posix/src/pthreadattrcompare.c
@@ -67,24 +67,22 @@ int rtems_pthread_attribute_compare(
if ( attr1->detachstate != attr2->detachstate )
return 1;
- #if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
- if ( attr1->affinitysetsize != attr2->affinitysetsize )
- return 1;
+ if ( attr1->affinitysetsize != attr2->affinitysetsize )
+ return 1;
- if (!CPU_EQUAL_S(
- attr1->affinitysetsize,
- attr1->affinityset,
- attr2->affinityset
- ))
- return 1;
+ if (!CPU_EQUAL_S(
+ attr1->affinitysetsize,
+ attr1->affinityset,
+ attr2->affinityset
+ ))
+ return 1;
- if (!CPU_EQUAL_S(
- attr1->affinitysetsize,
- &attr1->affinitysetpreallocated,
- &attr2->affinitysetpreallocated
- ))
- return 1;
- #endif
+ if (!CPU_EQUAL_S(
+ attr1->affinitysetsize,
+ &attr1->affinitysetpreallocated,
+ &attr2->affinitysetpreallocated
+ ))
+ return 1;
return 0;
}
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index 7f95898..1fda1e4 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -153,12 +153,10 @@ int pthread_create(
return rc;
#if defined(RTEMS_SMP)
-#if __RTEMS_HAVE_SYS_CPUSET_H__
- status = _CPU_set_Is_valid( the_attr->affinityset, the_attr->affinitysetsize );
+ status = _CPU_set_Is_valid(the_attr->affinityset, the_attr->affinitysetsize);
if ( !status )
return EINVAL;
#endif
-#endif
/*
* Currently all POSIX threads are floating point if the hardware
@@ -207,7 +205,7 @@ int pthread_create(
the_thread->Life.state |= THREAD_LIFE_CHANGE_DEFERRED;
-#if defined(RTEMS_SMP) && __RTEMS_HAVE_SYS_CPUSET_H__
+#if defined(RTEMS_SMP)
_ISR_lock_ISR_disable( &lock_context );
status = _Scheduler_Set_affinity(
the_thread,
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index 84ea806..d4b0f00 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -373,7 +373,6 @@ rtems_status_code rtems_task_is_suspended(
rtems_id id
);
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
/**
* @brief Gets the processor affinity set of a task.
*
@@ -429,7 +428,6 @@ rtems_status_code rtems_task_set_affinity(
size_t cpusetsize,
const cpu_set_t *cpuset
);
-#endif
/**
* @brief Gets the scheduler of a task.
@@ -493,7 +491,6 @@ rtems_status_code rtems_scheduler_ident(
rtems_id *id
);
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
/**
* @brief Gets the set of processors owned by the scheduler.
*
@@ -515,7 +512,6 @@ rtems_status_code rtems_scheduler_get_processor_set(
size_t cpusetsize,
cpu_set_t *cpuset
);
-#endif
/**@}*/
diff --git a/cpukit/rtems/src/schedulergetprocessorset.c b/cpukit/rtems/src/schedulergetprocessorset.c
index 016c368..267dcae 100644
--- a/cpukit/rtems/src/schedulergetprocessorset.c
+++ b/cpukit/rtems/src/schedulergetprocessorset.c
@@ -16,8 +16,6 @@
#include "config.h"
#endif
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
#include <rtems/rtems/tasks.h>
#include <rtems/score/cpusetimpl.h>
#include <rtems/score/schedulerimpl.h>
@@ -46,5 +44,3 @@ rtems_status_code rtems_scheduler_get_processor_set(
return RTEMS_SUCCESSFUL;
}
-
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
diff --git a/cpukit/rtems/src/taskgetaffinity.c b/cpukit/rtems/src/taskgetaffinity.c
index b24966d..4519534 100644
--- a/cpukit/rtems/src/taskgetaffinity.c
+++ b/cpukit/rtems/src/taskgetaffinity.c
@@ -18,8 +18,6 @@
#include "config.h"
#endif
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
#include <rtems/rtems/tasks.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/cpusetimpl.h>
@@ -65,4 +63,3 @@ rtems_status_code rtems_task_get_affinity(
_Thread_Dispatch_enable( cpu_self );
return ok ? RTEMS_SUCCESSFUL : RTEMS_INVALID_NUMBER;
}
-#endif
diff --git a/cpukit/rtems/src/tasksetaffinity.c b/cpukit/rtems/src/tasksetaffinity.c
index 6caf862..290a13b 100644
--- a/cpukit/rtems/src/tasksetaffinity.c
+++ b/cpukit/rtems/src/tasksetaffinity.c
@@ -18,8 +18,6 @@
#include "config.h"
#endif
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
#include <rtems/rtems/tasks.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/cpusetimpl.h>
@@ -65,4 +63,3 @@ rtems_status_code rtems_task_set_affinity(
_Thread_Dispatch_enable( cpu_self );
return ok ? RTEMS_SUCCESSFUL : RTEMS_INVALID_NUMBER;
}
-#endif
diff --git a/cpukit/score/include/rtems/score/cpuset.h b/cpukit/score/include/rtems/score/cpuset.h
index ebdb35d..564f4a5 100644
--- a/cpukit/score/include/rtems/score/cpuset.h
+++ b/cpukit/score/include/rtems/score/cpuset.h
@@ -21,8 +21,6 @@
#include <rtems/score/basedefs.h>
-#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
-
#include <sys/cpuset.h>
#ifdef __cplusplus
@@ -61,7 +59,5 @@ typedef struct {
}
#endif
-#endif /* __RTEMS_HAVE_SYS_CPUSET_H__ */
-
#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
index f9a0f0f..6a6bf97 100644
--- a/cpukit/score/include/rtems/score/cpusetimpl.h
+++ b/cpukit/score/include/rtems/score/cpusetimpl.h
@@ -28,8 +28,6 @@
extern "C" {
#endif
-#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
-
/**
* @brief Determine If the CPU Set if Valid
*
@@ -121,7 +119,6 @@ static inline void _CPU_set_Set(
set->setsize = setsize;
CPU_COPY( set->set, cpuset );
}
-#endif
/**@}*/
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index 1e6236f..a5a4d32 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -21,9 +21,7 @@
#include <rtems/score/priority.h>
#include <rtems/score/thread.h>
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
- #include <sys/cpuset.h>
-#endif
+#include <sys/cpuset.h>
#ifdef __cplusplus
extern "C" {
@@ -152,7 +150,6 @@ typedef struct {
struct Per_CPU_Control *
);
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
/** @see _Scheduler_Get_affinity() */
bool ( *get_affinity )(
const Scheduler_Control *,
@@ -168,7 +165,6 @@ typedef struct {
size_t,
const cpu_set_t *
);
-#endif
} Scheduler_Operations;
/**
@@ -517,7 +513,7 @@ void _Scheduler_default_Start_idle(
struct Per_CPU_Control *cpu
);
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
+#if defined(RTEMS_SMP)
/**
* @brief Get affinity for the default scheduler.
*
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index bfc6df3..f3b3d1b 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -641,8 +641,6 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_Set(
#endif
}
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
RTEMS_INLINE_ROUTINE void _Scheduler_Get_processor_set(
const Scheduler_Control *scheduler,
size_t cpusetsize,
@@ -723,8 +721,6 @@ bool _Scheduler_Set_affinity(
const cpu_set_t *cpuset
);
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
-
RTEMS_INLINE_ROUTINE void _Scheduler_Generic_block(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
diff --git a/cpukit/score/src/cpuset.c b/cpukit/score/src/cpuset.c
index deb9e43..718e887 100644
--- a/cpukit/score/src/cpuset.c
+++ b/cpukit/score/src/cpuset.c
@@ -19,7 +19,6 @@
#include "config.h"
#endif
-#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
#include <sys/cpuset.h>
#include <rtems/sysinit.h>
#include <rtems/score/cpusetimpl.h>
@@ -96,6 +95,3 @@ const CPU_set_Control *_CPU_set_Default()
{
return &cpuset_default;
}
-#endif
-
-
diff --git a/cpukit/score/src/cpusetprintsupport.c b/cpukit/score/src/cpusetprintsupport.c
index 76851d3..82a462c 100644
--- a/cpukit/score/src/cpusetprintsupport.c
+++ b/cpukit/score/src/cpusetprintsupport.c
@@ -26,59 +26,56 @@
#include <rtems/bspIo.h>
#include <rtems/score/cpusetimpl.h>
-#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
+void _CPU_set_Show_with_plugin(
+ void *context,
+ rtems_printk_plugin_t print,
+ const char *description,
+ const cpu_set_t *cpuset
+);
- void _CPU_set_Show_with_plugin(
- void *context,
- rtems_printk_plugin_t print,
- const char *description,
- const cpu_set_t *cpuset
- );
-
- /*
- * _CPU_set_Show_with_plugin
- *
- * This routine shows cpuset cpuset using a
- * print plugin .
- */
- void _CPU_set_Show_with_plugin(
- void *context,
- rtems_printk_plugin_t print,
- const char *description,
- const cpu_set_t *cpuset
- )
- {
- int i;
+/*
+ * _CPU_set_Show_with_plugin
+ *
+ * This routine shows cpuset cpuset using a
+ * print plugin .
+ */
+void _CPU_set_Show_with_plugin(
+ void *context,
+ rtems_printk_plugin_t print,
+ const char *description,
+ const cpu_set_t *cpuset
+)
+{
+ int i;
- if ( !print )
- return;
+ if ( !print )
+ return;
- (*print)(context ,"%s: ", description);
- for(i=0; i<_NCPUWORDS; i++)
- (*print)(context ,"%x", cpuset->__bits[i]);
- (*print)(context ,"\n");
- }
+ (*print)(context ,"%s: ", description);
+ for(i=0; i<_NCPUWORDS; i++)
+ (*print)(context ,"%x", cpuset->__bits[i]);
+ (*print)(context ,"\n");
+}
- /*
- * _CPU_set_Show
- *
- * This routine shows a cpuset using the
- * printk plugin.
- */
- void _CPU_set_Show( const char *description, const cpu_set_t *cpuset)
- {
- _CPU_set_Show_with_plugin( NULL, printk_plugin, description, cpuset );
- }
+/*
+ * _CPU_set_Show
+ *
+ * This routine shows a cpuset using the
+ * printk plugin.
+ */
+void _CPU_set_Show( const char *description, const cpu_set_t *cpuset)
+{
+ _CPU_set_Show_with_plugin( NULL, printk_plugin, description, cpuset );
+}
- /*
- * _CPU_set_Show_default
- *
- * This routine shows the default cpuset.
- */
- void _CPU_set_Show_default( const char *description )
- {
- const CPU_set_Control *ctl;
- ctl = _CPU_set_Default();
- _CPU_set_Show( description, ctl->set );
- }
-#endif
+/*
+ * _CPU_set_Show_default
+ *
+ * This routine shows the default cpuset.
+ */
+void _CPU_set_Show_default( const char *description )
+{
+ const CPU_set_Control *ctl;
+ ctl = _CPU_set_Default();
+ _CPU_set_Show( description, ctl->set );
+}
diff --git a/cpukit/score/src/schedulergetaffinity.c b/cpukit/score/src/schedulergetaffinity.c
index c910a75..db092aa 100644
--- a/cpukit/score/src/schedulergetaffinity.c
+++ b/cpukit/score/src/schedulergetaffinity.c
@@ -18,8 +18,6 @@
#include <rtems/score/schedulerimpl.h>
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
bool _Scheduler_Get_affinity(
Thread_Control *the_thread,
size_t cpusetsize,
@@ -56,5 +54,3 @@ bool _Scheduler_Get_affinity(
_Scheduler_Release_critical( scheduler, &lock_context );
return ok;
}
-
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
diff --git a/cpukit/score/src/schedulersetaffinity.c b/cpukit/score/src/schedulersetaffinity.c
index b59d8eb..cdf3679 100644
--- a/cpukit/score/src/schedulersetaffinity.c
+++ b/cpukit/score/src/schedulersetaffinity.c
@@ -18,8 +18,6 @@
#include <rtems/score/schedulerimpl.h>
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
bool _Scheduler_Set_affinity(
Thread_Control *the_thread,
size_t cpusetsize,
@@ -56,5 +54,3 @@ bool _Scheduler_Set_affinity(
_Scheduler_Release_critical( scheduler, &lock_context );
return ok;
}
-
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 779e0b5..665dc84 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -81,9 +81,6 @@ AC_CHECK_DECLS([pthread_getattr_np],[],[],[[
#define _GNU_SOURCE
#include <pthread.h>]])
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_HEADERS([cpuset.h])
-
# Mandated by POSIX, not declared in some versions of newlib.
AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
diff --git a/testsuites/smptests/configure.ac b/testsuites/smptests/configure.ac
index 2ea9eec..3b5973b 100644
--- a/testsuites/smptests/configure.ac
+++ b/testsuites/smptests/configure.ac
@@ -51,10 +51,6 @@ AC_CHECK_DECLS([pthread_getattr_np],[],[],[[
#define _GNU_SOURCE
#include <pthread.h>]])
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_HEADERS([sys/cpuset.h])
-AM_CONDITIONAL(HAS_CPUSET,test x"${ac_cv_header_sys_cpuset_h}" = x"yes")
-
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
smpstrongapa01/Makefile
diff --git a/testsuites/smptests/smpaffinity01/init.c b/testsuites/smptests/smpaffinity01/init.c
index 969a332..1b8fc72 100644
--- a/testsuites/smptests/smpaffinity01/init.c
+++ b/testsuites/smptests/smpaffinity01/init.c
@@ -17,8 +17,6 @@
const char rtems_test_name[] = "SMPAFFINITY 1";
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
rtems_id Init_id;
rtems_id Med_id[NUM_CPUS-1];
rtems_id Low_id[NUM_CPUS];
@@ -226,16 +224,6 @@ static void Init(rtems_task_argument arg)
rtems_test_exit(0);
}
-#else
-static void Init(rtems_task_argument arg)
-{
- TEST_BEGIN();
- puts( " Affinity NOT Supported");
- TEST_END();
- rtems_test_exit(0);
-}
-
-#endif
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
diff --git a/testsuites/smptests/smpscheduler02/init.c b/testsuites/smptests/smpscheduler02/init.c
index 40a481c..c78cbbf 100644
--- a/testsuites/smptests/smpscheduler02/init.c
+++ b/testsuites/smptests/smpscheduler02/init.c
@@ -23,8 +23,6 @@
const char rtems_test_name[] = "SMPSCHEDULER 2";
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
-
#define SCHED_A rtems_build_name(' ', ' ', ' ', 'A')
#define SCHED_B rtems_build_name(' ', ' ', ' ', 'B')
@@ -177,15 +175,6 @@ static void test(void)
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
}
-#else /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
-
-static void test(void)
-{
- /* Nothing to do */
-}
-
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
-
static void Init(rtems_task_argument arg)
{
rtems_resource_snapshot snapshot;
diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
index 20ea9d5..103e4f2 100644
--- a/testsuites/sptests/Makefile.am
+++ b/testsuites/sptests/Makefile.am
@@ -81,10 +81,7 @@ _SUBDIRS += spinternalerror02
_SUBDIRS += sptimer_err01 sptimer_err02
_SUBDIRS += sptimerserver01
_SUBDIRS += spclock_err02
-
-if HAS_CPUSET
_SUBDIRS += spcpuset01
-endif
include $(top_srcdir)/../automake/test-subdirs.am
include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index c96edd3..a2375fb 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -36,10 +36,6 @@ AM_CONDITIONAL(HAS__THREAD_QUEUE_QUEUE,test x"${ac_cv_type_struct__Thread_queue_
AC_CHECK_HEADERS([threads.h])
AM_CONDITIONAL([HAS_THREADS_H],[test x"$ac_cv_header_threads_h" = x"yes"])
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_HEADERS([sys/cpuset.h])
-AM_CONDITIONAL(HAS_CPUSET,test x"${ac_cv_header_sys_cpuset_h}" = x"yes")
-
# Some tests should not be built/run in SMP configurations
RTEMS_CHECK_CPUOPTS([RTEMS_SMP])
AM_CONDITIONAL(HAS_SMP,test "$rtems_cv_RTEMS_SMP" = "yes")
diff --git a/testsuites/sptests/spcpuset01/init.c b/testsuites/sptests/spcpuset01/init.c
index d77a240..5883707 100644
--- a/testsuites/sptests/spcpuset01/init.c
+++ b/testsuites/sptests/spcpuset01/init.c
@@ -15,7 +15,6 @@
const char rtems_test_name[] = "SPCPUSET 1";
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
static void test_cpu_zero_case_1(void)
{
size_t i;
@@ -154,15 +153,3 @@ rtems_task Init(
TEST_END();
exit( 0 );
}
-#else
-#error "Init - No cpuset"
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
- TEST_BEGIN();
- puts( " cpuset not supported\n" );
- TEST_END();
- exit( 0 );
-}
-#endif
diff --git a/testsuites/sptests/spcpuset01/system.h b/testsuites/sptests/spcpuset01/system.h
index bc9138d..85571c8 100644
--- a/testsuites/sptests/spcpuset01/system.h
+++ b/testsuites/sptests/spcpuset01/system.h
@@ -10,14 +10,12 @@
#include "tmacros.h"
#include "test_support.h"
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
#include <sys/cpuset.h>
/* global variables */
extern cpu_set_t set1;
extern cpu_set_t set2;
extern cpu_set_t set3;
-#endif
/* enable/disable verbose output */
#ifndef DPRINT
diff --git a/testsuites/sptests/spcpuset01/test.c b/testsuites/sptests/spcpuset01/test.c
index 494880d..8b4673f 100644
--- a/testsuites/sptests/spcpuset01/test.c
+++ b/testsuites/sptests/spcpuset01/test.c
@@ -11,7 +11,6 @@
#include <assert.h>
#include "system.h"
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
void test_cpu_and_case_1(size_t cpu1, size_t cpu2);
void test_cpu_nand_case_1(size_t cpu1, size_t cpu2);
void test_cpu_or_case_1(size_t cpu1, size_t cpu2);
@@ -124,4 +123,3 @@ void cpuset_logic_test()
}
}
}
-#endif
diff --git a/testsuites/sptests/spscheduler01/init.c b/testsuites/sptests/spscheduler01/init.c
index 31a0ec8..f2796d5 100644
--- a/testsuites/sptests/spscheduler01/init.c
+++ b/testsuites/sptests/spscheduler01/init.c
@@ -33,7 +33,6 @@ static const rtems_id invalid_id = 1;
static void test_task_get_set_affinity(void)
{
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
rtems_id self_id = rtems_task_self();
rtems_id task_id;
rtems_status_code sc;
@@ -116,7 +115,6 @@ static void test_task_get_set_affinity(void)
CPU_FREE(cpusetbig);
CPU_FREE(cpusetbigone);
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
}
static void task(rtems_task_argument arg)
@@ -217,7 +215,6 @@ static void test_scheduler_ident(void)
static void test_scheduler_get_processors(void)
{
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
rtems_status_code sc;
rtems_name name = BLUE;
rtems_id scheduler_id;
@@ -264,7 +261,6 @@ static void test_scheduler_get_processors(void)
CPU_FREE(cpusetbig);
CPU_FREE(cpusetbigone);
-#endif /* defined(__RTEMS_HAVE_SYS_CPUSET_H__) */
}
static void Init(rtems_task_argument arg)
--
1.7.1
More information about the devel
mailing list