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:
parent
d2c060d1ef
commit
027e00955d
2 changed files with 21 additions and 33 deletions
|
@ -5,7 +5,27 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pktqueue.h"
|
#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 tthread[THREADS_NUM*QUEUE_NUM];
|
||||||
static struct k_thread qthread[QUEUE_NUM];
|
static struct k_thread qthread[QUEUE_NUM];
|
||||||
|
|
|
@ -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
|
|
Loading…
Add table
Add a link
Reference in a new issue