mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-23 12:40:25 +08:00
優化padding
This commit is contained in:
20
server.c
20
server.c
@@ -31,22 +31,14 @@ static inline uint32_t last_nonnull(const char* p, uint32_t max_size);
|
|||||||
#define TCPOOL_THREADCNT THREADCNT
|
#define TCPOOL_THREADCNT THREADCNT
|
||||||
#define TCPOOL_MAXWAITSEC MAXWAITSEC
|
#define TCPOOL_MAXWAITSEC MAXWAITSEC
|
||||||
#define TCPOOL_THREAD_CONTEXT \
|
#define TCPOOL_THREAD_CONTEXT \
|
||||||
ssize_t numbytes; \
|
|
||||||
char *dat; \
|
|
||||||
uint8_t buf[ \
|
uint8_t buf[ \
|
||||||
TCPOOL_THREAD_TIMER_T_SZ \
|
TCPOOL_THREAD_TIMER_T_SZ \
|
||||||
-sizeof(uint32_t) \
|
-TCPOOL_THREAD_TIMER_T_HEAD_SZ \
|
||||||
-sizeof(int) \
|
-sizeof(ssize_t) \
|
||||||
-sizeof(time_t) \
|
-sizeof(char*) \
|
||||||
-sizeof(ssize_t) \
|
]; \
|
||||||
-sizeof(char*) \
|
ssize_t numbytes; \
|
||||||
-sizeof(pthread_rwlock_t) \
|
char *dat
|
||||||
-2*sizeof(pthread_t) \
|
|
||||||
-2*sizeof(pthread_cond_t) \
|
|
||||||
-2*sizeof(pthread_mutex_t) \
|
|
||||||
-sizeof(pthread_rwlock_t) \
|
|
||||||
-2*sizeof(uint8_t) \
|
|
||||||
]
|
|
||||||
|
|
||||||
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