mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-11 05:30:28 +08:00
優化padding
This commit is contained in:
13
server.c
13
server.c
@@ -30,15 +30,16 @@ static inline uint32_t last_nonnull(const char* p, uint32_t max_size);
|
|||||||
#define TCPOOL_THREAD_TIMER_T_SZ THREAD_TIMER_T_SZ
|
#define TCPOOL_THREAD_TIMER_T_SZ THREAD_TIMER_T_SZ
|
||||||
#define TCPOOL_THREADCNT THREADCNT
|
#define TCPOOL_THREADCNT THREADCNT
|
||||||
#define TCPOOL_MAXWAITSEC MAXWAITSEC
|
#define TCPOOL_MAXWAITSEC MAXWAITSEC
|
||||||
#define TCPOOL_THREAD_CONTEXT \
|
#define SERVER_THREAD_BUFSZ ( \
|
||||||
ssize_t numbytes; \
|
TCPOOL_THREAD_TIMER_T_SZ \
|
||||||
char *dat; \
|
|
||||||
uint8_t buf[ \
|
|
||||||
TCPOOL_THREAD_TIMER_T_SZ \
|
|
||||||
-TCPOOL_THREAD_TIMER_T_HEAD_SZ \
|
-TCPOOL_THREAD_TIMER_T_HEAD_SZ \
|
||||||
-sizeof(ssize_t) \
|
-sizeof(ssize_t) \
|
||||||
-sizeof(char*) \
|
-sizeof(char*) \
|
||||||
]
|
)
|
||||||
|
#define TCPOOL_THREAD_CONTEXT \
|
||||||
|
ssize_t numbytes; \
|
||||||
|
char *dat; \
|
||||||
|
uint8_t buf[SERVER_THREAD_BUFSZ]
|
||||||
|
|
||||||
static dict_t setdicts[THREADCNT];
|
static dict_t setdicts[THREADCNT];
|
||||||
static uint32_t* items_len;
|
static uint32_t* items_len;
|
||||||
|
|||||||
Reference in New Issue
Block a user