aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/common/irq_storm.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/common/irq_storm.c')
-rw-r--r--testhal/common/irq_storm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/testhal/common/irq_storm.c b/testhal/common/irq_storm.c
index 2e5382881..42a7a52be 100644
--- a/testhal/common/irq_storm.c
+++ b/testhal/common/irq_storm.c
@@ -92,7 +92,7 @@ static THD_FUNCTION(irq_storm_thread, arg) {
chRegSetThreadName("irq_storm");
/* Thread loop, until terminated.*/
- while (chThdShouldTerminateX() == false) {
+ while ((chEvtGetEventsX() & CH_EVENT_TERMINATE) != 0U) {
/* Waiting for a message.*/
chMBFetch(&mb[me], &msg, TIME_INFINITE);
@@ -271,7 +271,7 @@ void irq_storm_execute(const irq_storm_config_t *cfg) {
/* Terminating threads and cleaning up.*/
for (i = 0; i < IRQ_STORM_CFG_NUM_THREADS; i++) {
- chThdTerminate(threads[i]);
+ chEvtSignal(threads[i], CH_EVENT_TERMINATE);
chThdWait(threads[i]);
threads[i] = NULL;
}