From 336b733a510302af86fb4a528dd4371ff83ccfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=82=E7=85=9C=E6=B4=8B?= <1163589503@qq.com> Date: Tue, 11 Jul 2023 18:57:12 +0800 Subject: [PATCH] 23/07/11 Fix Lwip TCP Rx Speed. --- .../resources/ethernet/LwIP/arch/sys_arch.c | 42 ++----------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/Ubiquitous/XiZi_IIoT/resources/ethernet/LwIP/arch/sys_arch.c b/Ubiquitous/XiZi_IIoT/resources/ethernet/LwIP/arch/sys_arch.c index dae31e531..281ad1f56 100644 --- a/Ubiquitous/XiZi_IIoT/resources/ethernet/LwIP/arch/sys_arch.c +++ b/Ubiquitous/XiZi_IIoT/resources/ethernet/LwIP/arch/sys_arch.c @@ -85,27 +85,18 @@ char lwip_flag = 0; x_ticks_t lwip_sys_now; -struct sys_timeouts { - struct sys_timeo *next; -}; - -struct timeoutlist { - struct sys_timeouts timeouts; - int32 pid; -}; - #define SYS_THREAD_MAX 4 -static struct timeoutlist s_timeoutlist[SYS_THREAD_MAX]; - -static u16_t s_nextthread = 0; - struct netif gnetif; sys_sem_t* get_eth_recv_sem() { static sys_sem_t g_recv_sem = 0; return &g_recv_sem; } +void sys_init(void) { + // do nothing +} + u32_t sys_jiffies(void) { lwip_sys_now = CurrentTicksGain(); @@ -118,31 +109,6 @@ sys_now(void) { return CalculateTimeMsFromTick(lwip_sys_now); } -void -sys_init(void) { - int i; - for(i = 0; i < SYS_THREAD_MAX; i++) { - s_timeoutlist[i].pid = 0; - s_timeoutlist[i].timeouts.next = NULL; - } - s_nextthread = 0; -} - -struct sys_timeouts *sys_arch_timeouts(void) { - int i; - int32 pid; - struct timeoutlist *tl; - pid = (int32)GetKTaskDescriptor()->id.id; - for(i = 0; i < s_nextthread; i++) { - tl = &(s_timeoutlist[i]); - if(tl->pid == pid) - { - return &(tl->timeouts); - } - } - return NULL; -} - sys_prot_t sys_arch_protect(void) { return CriticalAreaLock(); }