aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F0xx/USB_CDC/main.c1
-rw-r--r--testhal/STM32/STM32F1xx/USB_CDC/main.c1
-rw-r--r--testhal/STM32/STM32F37x/USB_CDC/main.c1
-rw-r--r--testhal/STM32/STM32F3xx/USB_CDC/main.c1
-rw-r--r--testhal/STM32/STM32F3xx/USB_CDC_IAD/main.c4
-rw-r--r--testhal/STM32/STM32F4xx/SDC/main.c1
-rw-r--r--testhal/STM32/STM32F4xx/USB_CDC/main.c1
-rw-r--r--testhal/STM32/STM32F4xx/USB_CDC_IAD/main.c4
-rw-r--r--testhal/common/irq_storm.c4
9 files changed, 6 insertions, 12 deletions
diff --git a/testhal/STM32/STM32F0xx/USB_CDC/main.c b/testhal/STM32/STM32F0xx/USB_CDC/main.c
index 23605c5c4..3f7a0018c 100644
--- a/testhal/STM32/STM32F0xx/USB_CDC/main.c
+++ b/testhal/STM32/STM32F0xx/USB_CDC/main.c
@@ -155,7 +155,6 @@ int main(void) {
"shell", NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
- chThdFreeToHeap(shelltp); /* Returning memory to heap. */
}
chThdSleepMilliseconds(1000);
}
diff --git a/testhal/STM32/STM32F1xx/USB_CDC/main.c b/testhal/STM32/STM32F1xx/USB_CDC/main.c
index 33889477c..258da9de4 100644
--- a/testhal/STM32/STM32F1xx/USB_CDC/main.c
+++ b/testhal/STM32/STM32F1xx/USB_CDC/main.c
@@ -154,7 +154,6 @@ int main(void) {
"shell", NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
- chThdFreeToHeap(shelltp); /* Returning memory to heap. */
}
chThdSleepMilliseconds(1000);
}
diff --git a/testhal/STM32/STM32F37x/USB_CDC/main.c b/testhal/STM32/STM32F37x/USB_CDC/main.c
index 1f3fd7182..e8ce60a4f 100644
--- a/testhal/STM32/STM32F37x/USB_CDC/main.c
+++ b/testhal/STM32/STM32F37x/USB_CDC/main.c
@@ -161,7 +161,6 @@ int main(void) {
"shell", NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
- chThdFreeToHeap(shelltp); /* Returning memory to heap. */
}
chThdSleepMilliseconds(1000);
}
diff --git a/testhal/STM32/STM32F3xx/USB_CDC/main.c b/testhal/STM32/STM32F3xx/USB_CDC/main.c
index 76e1c64bb..ef668f109 100644
--- a/testhal/STM32/STM32F3xx/USB_CDC/main.c
+++ b/testhal/STM32/STM32F3xx/USB_CDC/main.c
@@ -162,7 +162,6 @@ int main(void) {
"shell", NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
- chThdFreeToHeap(shelltp); /* Returning memory to heap. */
}
chThdSleepMilliseconds(1000);
}
diff --git a/testhal/STM32/STM32F3xx/USB_CDC_IAD/main.c b/testhal/STM32/STM32F3xx/USB_CDC_IAD/main.c
index f45c4611c..54d8008c6 100644
--- a/testhal/STM32/STM32F3xx/USB_CDC_IAD/main.c
+++ b/testhal/STM32/STM32F3xx/USB_CDC_IAD/main.c
@@ -183,11 +183,11 @@ int main(void) {
/* Waiting for an exit event then freeing terminated shells.*/
chEvtWaitAny(EVENT_MASK(0));
if (chThdTerminatedX(shelltp1)) {
- chThdFreeToHeap(shelltp1);
+ chThdRelease(shelltp1);
shelltp1 = NULL;
}
if (chThdTerminatedX(shelltp2)) {
- chThdFreeToHeap(shelltp2);
+ chThdRelease(shelltp2);
shelltp2 = NULL;
}
}
diff --git a/testhal/STM32/STM32F4xx/SDC/main.c b/testhal/STM32/STM32F4xx/SDC/main.c
index 5c319fc09..9b7b9df2d 100644
--- a/testhal/STM32/STM32F4xx/SDC/main.c
+++ b/testhal/STM32/STM32F4xx/SDC/main.c
@@ -331,7 +331,6 @@ int main(void) {
"shell", NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
- chThdFreeToHeap(shelltp); /* Returning memory to heap. */
chThdSleepMilliseconds(1000);
}
}
diff --git a/testhal/STM32/STM32F4xx/USB_CDC/main.c b/testhal/STM32/STM32F4xx/USB_CDC/main.c
index cffc8427a..50dd81eec 100644
--- a/testhal/STM32/STM32F4xx/USB_CDC/main.c
+++ b/testhal/STM32/STM32F4xx/USB_CDC/main.c
@@ -162,7 +162,6 @@ int main(void) {
"shell", NORMALPRIO + 1,
shellThread, (void *)&shell_cfg1);
chThdWait(shelltp); /* Waiting termination. */
- chThdFreeToHeap(shelltp); /* Returning memory to heap. */
}
chThdSleepMilliseconds(1000);
}
diff --git a/testhal/STM32/STM32F4xx/USB_CDC_IAD/main.c b/testhal/STM32/STM32F4xx/USB_CDC_IAD/main.c
index 84c7ec3fc..3b768f331 100644
--- a/testhal/STM32/STM32F4xx/USB_CDC_IAD/main.c
+++ b/testhal/STM32/STM32F4xx/USB_CDC_IAD/main.c
@@ -176,11 +176,11 @@ int main(void) {
/* Waiting for an exit event then freeing terminated shells.*/
chEvtWaitAny(EVENT_MASK(0));
if (chThdTerminatedX(shelltp1)) {
- chThdFreeToHeap(shelltp1);
+ chThdRelease(shelltp1);
shelltp1 = NULL;
}
if (chThdTerminatedX(shelltp2)) {
- chThdFreeToHeap(shelltp2);
+ chThdRelease(shelltp2);
shelltp2 = NULL;
}
}
diff --git a/testhal/common/irq_storm.c b/testhal/common/irq_storm.c
index 42a7a52be..2e5382881 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 ((chEvtGetEventsX() & CH_EVENT_TERMINATE) != 0U) {
+ while (chThdShouldTerminateX() == false) {
/* 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++) {
- chEvtSignal(threads[i], CH_EVENT_TERMINATE);
+ chThdTerminate(threads[i]);
chThdWait(threads[i]);
threads[i] = NULL;
}