From 32341456696b90eeab3a55c409172e2b51c53343 Mon Sep 17 00:00:00 2001 From: Peter Mitsis Date: Wed, 18 Oct 2023 11:57:47 -0400 Subject: [PATCH] tests: app_kernel: Rename fifo to msgq Changed references of fifo to msgq as the fifo name was a remnant of the old microkernel. Signed-off-by: Peter Mitsis --- tests/benchmarks/app_kernel/src/master.c | 2 +- tests/benchmarks/app_kernel/src/master.h | 4 +- .../app_kernel/src/{fifo_b.c => msgq_b.c} | 42 +++++++++---------- .../app_kernel/src/{fifo_r.c => msgq_r.c} | 8 ++-- 4 files changed, 28 insertions(+), 28 deletions(-) rename tests/benchmarks/app_kernel/src/{fifo_b.c => msgq_b.c} (50%) rename tests/benchmarks/app_kernel/src/{fifo_r.c => msgq_r.c} (69%) diff --git a/tests/benchmarks/app_kernel/src/master.c b/tests/benchmarks/app_kernel/src/master.c index d09d3528bb3..4344d3e5766 100644 --- a/tests/benchmarks/app_kernel/src/master.c +++ b/tests/benchmarks/app_kernel/src/master.c @@ -68,7 +68,7 @@ int main(void) PRINT_STRING("| S I M P L E S E R V I C E " "M E A S U R E M E N T S | nsec |\n"); PRINT_STRING(dashline); - queue_test(); + message_queue_test(); sema_test(); mutex_test(); memorymap_test(); diff --git a/tests/benchmarks/app_kernel/src/master.h b/tests/benchmarks/app_kernel/src/master.h index 213e8a24c60..cc007905230 100644 --- a/tests/benchmarks/app_kernel/src/master.h +++ b/tests/benchmarks/app_kernel/src/master.h @@ -27,7 +27,7 @@ /* length of the output line */ #define SLINE_LEN 256 -#define NR_OF_FIFO_RUNS 500 +#define NR_OF_MSGQ_RUNS 500 #define NR_OF_SEMA_RUNS 500 #define NR_OF_MUTEX_RUNS 1000 #define NR_OF_MAP_RUNS 1000 @@ -65,7 +65,7 @@ extern void recvtask(void *p1, void *p2, void *p3); extern void mailbox_test(void); extern void sema_test(void); -extern void queue_test(void); +extern void message_queue_test(void); extern void mutex_test(void); extern void memorymap_test(void); extern void pipe_test(void); diff --git a/tests/benchmarks/app_kernel/src/fifo_b.c b/tests/benchmarks/app_kernel/src/msgq_b.c similarity index 50% rename from tests/benchmarks/app_kernel/src/fifo_b.c rename to tests/benchmarks/app_kernel/src/msgq_b.c index 0ff5faf60d8..e79734242be 100644 --- a/tests/benchmarks/app_kernel/src/fifo_b.c +++ b/tests/benchmarks/app_kernel/src/msgq_b.c @@ -1,4 +1,4 @@ -/* fifo_b.c */ +/* msgq_b.c */ /* * Copyright (c) 1997-2010, 2013-2014 Wind River Systems, Inc. @@ -9,74 +9,74 @@ #include "master.h" /** - * @brief Queue transfer speed test + * @brief Message queue transfer speed test */ -void queue_test(void) +void message_queue_test(void) { uint32_t et; /* elapsed time */ int i; PRINT_STRING(dashline); et = BENCH_START(); - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_put(&DEMOQX1, data_bench, K_FOREVER); } et = TIME_STAMP_DELTA_GET(et); - PRINT_F(FORMAT, "enqueue 1 byte msg in FIFO", - SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_FIFO_RUNS)); + PRINT_F(FORMAT, "enqueue 1 byte msg in MSGQ", + SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_MSGQ_RUNS)); et = BENCH_START(); - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_get(&DEMOQX1, data_bench, K_FOREVER); } et = TIME_STAMP_DELTA_GET(et); check_result(); - PRINT_F(FORMAT, "dequeue 1 byte msg in FIFO", - SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_FIFO_RUNS)); + PRINT_F(FORMAT, "dequeue 1 byte msg from MSGQ", + SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_MSGQ_RUNS)); et = BENCH_START(); - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_put(&DEMOQX4, data_bench, K_FOREVER); } et = TIME_STAMP_DELTA_GET(et); check_result(); - PRINT_F(FORMAT, "enqueue 4 bytes msg in FIFO", - SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_FIFO_RUNS)); + PRINT_F(FORMAT, "enqueue 4 bytes msg in MSGQ", + SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_MSGQ_RUNS)); et = BENCH_START(); - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_get(&DEMOQX4, data_bench, K_FOREVER); } et = TIME_STAMP_DELTA_GET(et); check_result(); - PRINT_F(FORMAT, "dequeue 4 bytes msg in FIFO", - SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_FIFO_RUNS)); + PRINT_F(FORMAT, "dequeue 4 bytes msg in MSGQ", + SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_MSGQ_RUNS)); k_sem_give(&STARTRCV); et = BENCH_START(); - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_put(&DEMOQX1, data_bench, K_FOREVER); } et = TIME_STAMP_DELTA_GET(et); check_result(); PRINT_F(FORMAT, - "enqueue 1 byte msg in FIFO to a waiting higher priority task", - SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_FIFO_RUNS)); + "enqueue 1 byte msg in MSGQ to a waiting higher priority task", + SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_MSGQ_RUNS)); et = BENCH_START(); - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_put(&DEMOQX4, data_bench, K_FOREVER); } et = TIME_STAMP_DELTA_GET(et); check_result(); PRINT_F(FORMAT, - "enqueue 4 bytes in FIFO to a waiting higher priority task", - SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_FIFO_RUNS)); + "enqueue 4 bytes in MSGQ to a waiting higher priority task", + SYS_CLOCK_HW_CYCLES_TO_NS_AVG(et, NR_OF_MSGQ_RUNS)); } diff --git a/tests/benchmarks/app_kernel/src/fifo_r.c b/tests/benchmarks/app_kernel/src/msgq_r.c similarity index 69% rename from tests/benchmarks/app_kernel/src/fifo_r.c rename to tests/benchmarks/app_kernel/src/msgq_r.c index 42f17f1201c..91722ee364d 100644 --- a/tests/benchmarks/app_kernel/src/fifo_r.c +++ b/tests/benchmarks/app_kernel/src/msgq_r.c @@ -1,4 +1,4 @@ -/* fifo_r.c */ +/* msgq_r.c */ /* * Copyright (c) 1997-2010, 2013-2014 Wind River Systems, Inc. @@ -9,7 +9,7 @@ #include "receiver.h" #include "master.h" -/* queue transfer speed test */ +/* message queue transfer speed test */ /** * @brief Data receive task @@ -18,11 +18,11 @@ void dequtask(void) { int x, i; - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_get(&DEMOQX1, &x, K_FOREVER); } - for (i = 0; i < NR_OF_FIFO_RUNS; i++) { + for (i = 0; i < NR_OF_MSGQ_RUNS; i++) { k_msgq_get(&DEMOQX4, &x, K_FOREVER); } }