From 027e00955d0b88bab80931b676c266b9714aef77 Mon Sep 17 00:00:00 2001 From: Paul He Date: Sat, 18 May 2024 23:14:55 +0800 Subject: [PATCH] samples: pktqueue: remove main.h Normally main.c file doesn't have a header file, because it doesn't need to declare any interface to other modules. In this sample, it makes more sense to put all the relevant macro definitions in main.c directly. Signed-off-by: Paul He --- samples/arch/smp/pktqueue/src/main.c | 22 ++++++++++++++++++- samples/arch/smp/pktqueue/src/main.h | 32 ---------------------------- 2 files changed, 21 insertions(+), 33 deletions(-) delete mode 100644 samples/arch/smp/pktqueue/src/main.h diff --git a/samples/arch/smp/pktqueue/src/main.c b/samples/arch/smp/pktqueue/src/main.c index 009cd2de966..cfffd813a8b 100644 --- a/samples/arch/smp/pktqueue/src/main.c +++ b/samples/arch/smp/pktqueue/src/main.c @@ -5,7 +5,27 @@ */ #include "pktqueue.h" -#include "main.h" + +/* Amount of parallel processed sender/receiver queues of packet headers */ +#define QUEUE_NUM 2 + +/* Amount of execution threads per pair of queues*/ +#define THREADS_NUM (CONFIG_MP_MAX_NUM_CPUS+1) + +/* Amount of packet headers in a queue */ +#define SIZE_OF_QUEUE 5000 + +/* Size of packet header (in bytes) */ +#define SIZE_OF_HEADER 24 + +/* CRC16 polynomial */ +#define POLYNOMIAL 0x8005 + +/* CRC bytes in the packet */ +#define CRC_BYTE_1 10 +#define CRC_BYTE_2 11 + +#define STACK_SIZE 2048 static struct k_thread tthread[THREADS_NUM*QUEUE_NUM]; static struct k_thread qthread[QUEUE_NUM]; diff --git a/samples/arch/smp/pktqueue/src/main.h b/samples/arch/smp/pktqueue/src/main.h deleted file mode 100644 index 20020563ca1..00000000000 --- a/samples/arch/smp/pktqueue/src/main.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2020 Synopsys, Inc. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include - - -/* Amount of parallel processed sender/receiver queues of packet headers */ -#define QUEUE_NUM 2 - -/* Amount of execution threads per pair of queues*/ -#define THREADS_NUM (CONFIG_MP_MAX_NUM_CPUS+1) - -/* Amount of packet headers in a queue */ -#define SIZE_OF_QUEUE 5000 - -/* Size of packet header (in bytes) */ -#define SIZE_OF_HEADER 24 - -/* CRC16 polynomial */ -#define POLYNOMIAL 0x8005 - -/* CRC bytes in the packet */ -#define CRC_BYTE_1 10 -#define CRC_BYTE_2 11 - -#define STACK_SIZE 2048