testing/ostest: remove spurious redefinitions of NULL

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
Juha Niskanen 2021-11-29 17:00:43 +02:00 committed by Xiang Xiao
parent e0fc53b23c
commit 0c21a89a3f
12 changed files with 12 additions and 52 deletions

View File

@ -31,9 +31,9 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL /****************************************************************************
# define NULL (void*)0 * Private Types
#endif ****************************************************************************/
static volatile enum static volatile enum
{ {
@ -42,6 +42,10 @@ static volatile enum
COND_WAIT COND_WAIT
} waiter_state; } waiter_state;
/****************************************************************************
* Private Data
****************************************************************************/
static pthread_mutex_t mutex; static pthread_mutex_t mutex;
static pthread_cond_t cond; static pthread_cond_t cond;
static volatile int data_available = 0; static volatile int data_available = 0;
@ -54,7 +58,7 @@ static int signaler_state = 0;
static int signaler_nerrors = 0; static int signaler_nerrors = 0;
/**************************************************************************** /****************************************************************************
* Public Functions * Private Functions
****************************************************************************/ ****************************************************************************/
static void *thread_waiter(void *parameter) static void *thread_waiter(void *parameter)
@ -215,6 +219,10 @@ static void *thread_signaler(void *parameter)
return NULL; /* Non-reachable -- needed for some compilers */ return NULL; /* Non-reachable -- needed for some compilers */
} }
/****************************************************************************
* Public Functions
****************************************************************************/
void cond_test(void) void cond_test(void)
{ {
pthread_t waiter; pthread_t waiter;

View File

@ -86,10 +86,6 @@
#define FPU_WORDSIZE ((CONFIG_TESTING_OSTEST_FPUSIZE+3)>>2) #define FPU_WORDSIZE ((CONFIG_TESTING_OSTEST_FPUSIZE+3)>>2)
#define FPU_NTHREADS 2 #define FPU_NTHREADS 2
#ifndef NULL
# define NULL (void*)0
#endif
/**************************************************************************** /****************************************************************************
* External Dependencies * External Dependencies
****************************************************************************/ ****************************************************************************/

View File

@ -30,10 +30,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#define NLOOPS 32 #define NLOOPS 32
/**************************************************************************** /****************************************************************************

View File

@ -40,10 +40,6 @@
#define SEM1_NAME "foo" #define SEM1_NAME "foo"
#define SEM2_NAME "bar" #define SEM2_NAME "bar"
#ifndef NULL
# define NULL (void*)0
#endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/

View File

@ -34,10 +34,6 @@
* Private Definitions * Private Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#define MY_TIMER_SIGNAL 17 #define MY_TIMER_SIGNAL 17
#define SIGVALUE_INT 42 #define SIGVALUE_INT 42

View File

@ -32,10 +32,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/

View File

@ -35,10 +35,6 @@
* Preprocessor Definitions * Preprocessor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# error Broken toolchain does not have NULL
#endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/

View File

@ -35,10 +35,6 @@
* Private Definitions * Private Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#define MY_TIMER_SIGNAL 17 #define MY_TIMER_SIGNAL 17
#define SIGVALUE_INT 42 #define SIGVALUE_INT 42

View File

@ -36,10 +36,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#define WAKEUP_SIGNAL 17 #define WAKEUP_SIGNAL 17
#define SIGVALUE_INT 42 #define SIGVALUE_INT 42

View File

@ -37,10 +37,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#define WAKEUP_SIGNAL 17 #define WAKEUP_SIGNAL 17
#define SIGVALUE_INT 42 #define SIGVALUE_INT 42

View File

@ -30,10 +30,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#define NLOOPS 32 #define NLOOPS 32
/**************************************************************************** /****************************************************************************

View File

@ -34,14 +34,6 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef NULL
# define NULL (void*)0
#endif
#ifndef OK
# define OK 0
#endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/