mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-05 08:20:29 +08:00
optimize: keep timer on send_all
This commit is contained in:
2
config.h
2
config.h
@@ -17,4 +17,6 @@ typedef struct const_config_t const_config_t;
|
|||||||
|
|
||||||
#define TCPOOL_MAXWAITSEC 16
|
#define TCPOOL_MAXWAITSEC 16
|
||||||
|
|
||||||
|
#define TCPOOL_THREADCNT 32
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
4
server.c
4
server.c
@@ -51,6 +51,8 @@ static uint8_t _cfg[sizeof(simple_pb_t)+sizeof(config_t)];
|
|||||||
uint8_t isopen; /* 是否获得了文件锁 */ \
|
uint8_t isopen; /* 是否获得了文件锁 */ \
|
||||||
char data[SERVER_THREAD_BUFSZ]
|
char data[SERVER_THREAD_BUFSZ]
|
||||||
|
|
||||||
|
static volatile uintptr_t is_sending_all[TCPOOL_THREADCNT];
|
||||||
|
|
||||||
#define TCPOOL_TOUCH_TIMER_CONDITION (is_sending_all[index])
|
#define TCPOOL_TOUCH_TIMER_CONDITION (is_sending_all[index])
|
||||||
|
|
||||||
#define TCPOOL_INIT_ACTION \
|
#define TCPOOL_INIT_ACTION \
|
||||||
@@ -70,8 +72,6 @@ static uint8_t _cfg[sizeof(simple_pb_t)+sizeof(config_t)];
|
|||||||
|
|
||||||
#include "tcpool.h"
|
#include "tcpool.h"
|
||||||
|
|
||||||
static volatile uintptr_t is_sending_all[TCPOOL_THREADCNT];
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check_buffer 检查接收到的数据,结合
|
* check_buffer 检查接收到的数据,结合
|
||||||
|
|||||||
Reference in New Issue
Block a user