zephyr/tests/benchmarks/app_kernel/src/msgq_r.c
Peter Mitsis 4e426fbfa1 tests: app_kernel: extend msgq test
Extends the msgq benchmark test to obtain data for larger message
queues (messages of size 192 bytes). This allows for a better
indication of what the impact of data size is on message queue
performance.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2023-10-31 08:58:45 +01:00

34 lines
584 B
C

/* msgq_r.c */
/*
* Copyright (c) 1997-2010, 2013-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "receiver.h"
#include "master.h"
/* message queue transfer speed test */
static BENCH_BMEM char buffer[192];
/**
* @brief Data receive task
*/
void dequtask(void)
{
int i;
for (i = 0; i < NR_OF_MSGQ_RUNS; i++) {
k_msgq_get(&DEMOQX1, buffer, K_FOREVER);
}
for (i = 0; i < NR_OF_MSGQ_RUNS; i++) {
k_msgq_get(&DEMOQX4, buffer, K_FOREVER);
}
for (i = 0; i < NR_OF_MSGQ_RUNS; i++) {
k_msgq_get(&DEMOQX192, buffer, K_FOREVER);
}
}