summaryrefslogtreecommitdiffstats
path: root/testsuite/swi01/swi_test.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-09 22:52:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-10-10 09:08:23 +0200
commite599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch)
tree1172b8b830a1c3236e45c834c2b80e01325ea144 /testsuite/swi01/swi_test.c
parentMove files to match FreeBSD layout (diff)
downloadrtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2
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 <sys/socket.h> directly for example. Generate one Makefile which builds everything including tests.
Diffstat (limited to '')
-rw-r--r--testsuite/swi01/swi_test.c26
1 files changed, 13 insertions, 13 deletions
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 <stdio.h>
#include <unistd.h>
-#include <freebsd/machine/rtems-bsd-config.h>
+#include <machine/rtems-bsd-config.h>
-#include <freebsd/sys/types.h>
-#include <freebsd/sys/systm.h>
+#include <sys/types.h>
+#include <sys/systm.h>
-#include <freebsd/sys/param.h>
-#include <freebsd/sys/bus.h>
-#include <freebsd/sys/interrupt.h>
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/interrupt.h>
#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);
}