summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxintrcritical01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-20 13:07:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-23 09:27:47 +0200
commit21f733397903db061c17185a17fcee95e38ee21f (patch)
tree19a4dde12c8d645af528c3339cae7697050efa11 /testsuites/psxtests/psxintrcritical01
parent857a65dc7ed8987f5fc72f23ebcf7eba65070362 (diff)
downloadrtems-21f733397903db061c17185a17fcee95e38ee21f.tar.bz2
spintrcritical01/2/3/4/5: Use T_interrupt_test()
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/psxintrcritical01/init.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/testsuites/psxtests/psxintrcritical01/init.c b/testsuites/psxtests/psxintrcritical01/init.c
index dd46c03475..ea60b38c5b 100644
--- a/testsuites/psxtests/psxintrcritical01/init.c
+++ b/testsuites/psxtests/psxintrcritical01/init.c
@@ -17,7 +17,7 @@
#include <time.h>
#include <rtems/test.h>
-#include <rtems/simple-test.h>
+#include <rtems/test-info.h>
const char rtems_test_name[] = "PSXINTRCRITICAL 1";
@@ -53,20 +53,15 @@ static void action(void *arg)
ctx->late = true;
T_quiet_psx_success(rv);
- while (T_interrupt_test_get_state() == T_INTERRUPT_TEST_ACTION) {
- /* Wait */
- }
+ T_interrupt_test_busy_wait_for_interrupt();
}
static T_interrupt_test_state interrupt(void *arg)
{
test_context *ctx;
- T_interrupt_test_state state;
int rv;
- state = T_interrupt_test_get_state();
-
- if (state != T_INTERRUPT_TEST_ACTION) {
+ if (T_interrupt_test_get_state() != T_INTERRUPT_TEST_ACTION) {
return T_INTERRUPT_TEST_EARLY;
}