forked from Imagelibrary/rtems
spcpuset01: Add check for sys/cpuset.h.
If <sys/cpuset.h> is not provided by the toolset, the test cannot be compiled.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -9,19 +9,23 @@
|
||||
|
||||
#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
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
/* global variables */
|
||||
extern cpu_set_t set1;
|
||||
extern cpu_set_t set2;
|
||||
extern cpu_set_t set3;
|
||||
|
||||
void cpuset_logic_test(void);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#if HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Fully exercise CPU_SET() methods
|
||||
*/
|
||||
@@ -6,10 +10,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <sys/cpuset.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);
|
||||
@@ -122,4 +125,4 @@ void cpuset_logic_test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user