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 <pawpawhe@gmail.com>
This commit is contained in:
Paul He 2024-05-18 23:14:55 +08:00 committed by Anas Nashif
commit 027e00955d
2 changed files with 21 additions and 33 deletions

View file

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

View file

@ -1,32 +0,0 @@
/*
* Copyright (c) 2020 Synopsys, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <stdio.h>
#include <zephyr/sys/crc.h>
#include <zephyr/random/random.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