From e599318e912d8836c59d8b5202e3e31a6b8dcae9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 9 Oct 2013 22:52:54 +0200 Subject: Update files to match FreeBSD layout Add compatibility with Newlib header files. Some FreeBSD header files are mapped by the translation script: o rtems/bsd/sys/_types.h o rtems/bsd/sys/errno.h o rtems/bsd/sys/lock.h o rtems/bsd/sys/param.h o rtems/bsd/sys/resource.h o rtems/bsd/sys/time.h o rtems/bsd/sys/timespec.h o rtems/bsd/sys/types.h o rtems/bsd/sys/unistd.h It is now possible to include directly for example. Generate one Makefile which builds everything including tests. --- testsuite/swi01/Makefile | 27 --------------------------- testsuite/swi01/init.c | 2 +- testsuite/swi01/swi_test.c | 26 +++++++++++++------------- 3 files changed, 14 insertions(+), 41 deletions(-) delete mode 100644 testsuite/swi01/Makefile (limited to 'testsuite/swi01') diff --git a/testsuite/swi01/Makefile b/testsuite/swi01/Makefile deleted file mode 100644 index f5de48f4..00000000 --- a/testsuite/swi01/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -include ../../config.inc - -APP=swi01 -PGM=${ARCH}/$(APP).exe - -# optional managers required -MANAGERS=all - -# C source names -C_FILES = init.c swi_test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) - -AM_CPPFLAGS += -I $(INSTALL_BASE)/include -LINK_LIBS += $(INSTALL_BASE)/libbsd.a ${REL_ARGS} -CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused -Wl,-Map,$(APP).map - -include $(RTEMS_MAKEFILE_PATH)/Makefile.inc -include $(RTEMS_CUSTOM) -include $(PROJECT_ROOT)/make/leaf.cfg - -OBJS= $(C_O_FILES) -CLEAN_ADDITIONS += $(APP).map - -all: ${ARCH} $(PGM) - -$(PGM): $(OBJS) - -$(make-exe) diff --git a/testsuite/swi01/init.c b/testsuite/swi01/init.c index 9bc13dc6..57d77f80 100644 --- a/testsuite/swi01/init.c +++ b/testsuite/swi01/init.c @@ -34,7 +34,7 @@ #include -#include +#include #include "swi_test.h" diff --git a/testsuite/swi01/swi_test.c b/testsuite/swi01/swi_test.c index 99ba94f4..093458e7 100644 --- a/testsuite/swi01/swi_test.c +++ b/testsuite/swi01/swi_test.c @@ -34,19 +34,19 @@ #include #include -#include +#include -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include #define SWI_TEST_THREAD_PRIO (0) // Time to wait for swi-test-handler -#define SWI_SLEEP_TIME (100) +#define SWI_SLEEP_TIME (1) enum arg { HANDLER_NOT_VISITED, @@ -78,7 +78,7 @@ void swi_test_normal_handler() swi_sched(test_ih, 0); - usleep(SWI_SLEEP_TIME); + sleep(SWI_SLEEP_TIME); assert(argument == HANDLER_VISITED); } @@ -98,7 +98,7 @@ void swi_test_exclusive_handler() swi_sched(test_ih, 0); - usleep(SWI_SLEEP_TIME); + sleep(SWI_SLEEP_TIME); assert(argument == HANDLER_VISITED); } @@ -124,7 +124,7 @@ void swi_test_error_intr_entropy_set() SWI_TEST_THREAD_PRIO, INTR_ENTROPY, &test_ih); assert(retval == EINVAL); - usleep(SWI_SLEEP_TIME); + sleep(SWI_SLEEP_TIME); assert(argument == HANDLER_NOT_VISITED); } @@ -148,7 +148,7 @@ void swi_test_error_name_null() SWI_TEST_THREAD_PRIO, 0, &test_ih); assert(retval == EINVAL); - usleep(SWI_SLEEP_TIME); + sleep(SWI_SLEEP_TIME); assert(argument == HANDLER_NOT_VISITED); } @@ -166,7 +166,7 @@ void swi_test_error_handler_null() SWI_TEST_THREAD_PRIO, 0, &test_ih); assert(retval == EINVAL); - usleep(SWI_SLEEP_TIME); + sleep(SWI_SLEEP_TIME); assert(argument == HANDLER_NOT_VISITED); } @@ -189,7 +189,7 @@ void swi_test_error_has_allready_exclusive() SWI_TEST_THREAD_PRIO, 0, &test_ih2); assert(retval == EINVAL); - usleep(SWI_SLEEP_TIME); + sleep(SWI_SLEEP_TIME); assert(argument == HANDLER_NOT_VISITED); } -- cgit v1.2.3