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 <peter.mitsis@intel.com>
This commit is contained in:
Peter Mitsis 2023-10-18 11:57:47 -04:00 committed by Carles Cufí
parent 77cedbf630
commit 3234145669
4 changed files with 28 additions and 28 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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));
}

View file

@ -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);
}
}