summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Sommer <jan.sommer@dlr.de>2020-05-31 16:22:58 +0200
committerChris Johns <chrisj@rtems.org>2020-06-11 13:29:35 +1000
commit6369dafbb60ef791f7b14e9b585b3a105be9cf67 (patch)
tree0b7e8649fda6a1bc4eddddaca0cc7c814a539319
parentbsps/pc386: Separate smp API functions. Makes smpfatal08 link (diff)
downloadrtems-6369dafbb60ef791f7b14e9b585b3a105be9cf67.tar.bz2
smpsignal01: Change state before sending the signal
The signal handler of the consumer might start executing before rtems_signal_send of the producer returns. Therefore change the state to SIG_1_SENT before sending the signal.
-rw-r--r--testsuites/smptests/smpsignal01/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuites/smptests/smpsignal01/init.c b/testsuites/smptests/smpsignal01/init.c
index 36a66bea9b..025e84c6a2 100644
--- a/testsuites/smptests/smpsignal01/init.c
+++ b/testsuites/smptests/smpsignal01/init.c
@@ -81,10 +81,10 @@ static void signal_send(test_context *ctx, test_state new_state)
{
rtems_status_code sc;
+ change_state(ctx, new_state);
sc = rtems_signal_send(ctx->consumer, TEST_SIGNAL);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- change_state(ctx, new_state);
}
static void check_consumer_processor(const test_context *ctx)