summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spcpuset01/init.c
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2014-02-06 12:51:01 -0600
committerJennifer Averett <jennifer.averett@oarcorp.com>2014-03-07 09:07:17 -0600
commit13ab94be6ce3130c55ebb57fa96406d6b6e8c2b8 (patch)
tree387a67898a057c29f68dd65629c248a56521d243 /testsuites/sptests/spcpuset01/init.c
parentsmptests: Delete config.h.in (diff)
downloadrtems-13ab94be6ce3130c55ebb57fa96406d6b6e8c2b8.tar.bz2
spcpuset01: Add check for sys/cpuset.h.
If <sys/cpuset.h> is not provided by the toolset, the test cannot be compiled.
Diffstat (limited to '')
-rw-r--r--testsuites/sptests/spcpuset01/init.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/testsuites/sptests/spcpuset01/init.c b/testsuites/sptests/spcpuset01/init.c
index fa0e6a8d7c..138438fd68 100644
--- a/testsuites/sptests/spcpuset01/init.c
+++ b/testsuites/sptests/spcpuset01/init.c
@@ -11,10 +11,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
-
-#include <sys/cpuset.h>
#include "system.h"
+
+#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
static void test_cpu_zero_case_1(void)
{
size_t i;
@@ -153,3 +153,15 @@ rtems_task Init(
puts( "*** END OF CPUSET01 Test ***" );
exit( 0 );
}
+#else
+#error "Init - No cpuset"
+rtems_task Init(
+ rtems_task_argument ignored
+)
+{
+ puts( "*** CPUSET01 Test ***" );
+ puts( " cpuset not supported\n" );
+ puts( "*** END OF CPUSET01 Test ***" );
+ exit( 0 );
+}
+#endif