1
0
mirror of https://github.com/fumiama/simple-dict.git synced 2026-06-08 12:00:24 +08:00
This commit is contained in:
源文雨
2023-11-08 15:23:58 +09:00
parent b22d6cb9e2
commit 0e36396012

View File

@@ -22,6 +22,18 @@
#define TCPOOL_THREAD_TIMER_T_SZ 1024
#endif
#define TCPOOL_THREAD_TIMER_T_HEAD_SZ ( \
sizeof(uint32_t) \
+sizeof(int) \
+sizeof(time_t) \
+sizeof(pthread_rwlock_t) \
+2*sizeof(pthread_t) \
+2*sizeof(pthread_cond_t) \
+2*sizeof(pthread_mutex_t) \
+sizeof(pthread_rwlock_t) \
+2*sizeof(uint8_t) \
)
#ifndef TCPOOL_THREADCNT
#define TCPOOL_THREADCNT 32
#endif
@@ -32,16 +44,8 @@
#ifndef TCPOOL_THREAD_CONTEXT
#define TCPOOL_THREAD_CONTEXT uint8_t __padding[ \
TCPOOL_THREAD_TIMER_T_SZ \
-sizeof(uint32_t) \
-sizeof(int) \
-sizeof(time_t) \
-sizeof(pthread_rwlock_t) \
-2*sizeof(pthread_t) \
-2*sizeof(pthread_cond_t) \
-2*sizeof(pthread_mutex_t) \
-sizeof(pthread_rwlock_t) \
-2*sizeof(uint8_t) \
TCPOOL_THREAD_TIMER_T_SZ \
-TCPOOL_THREAD_TIMER_T_HEAD_SZ \
]
#endif