From 733db95c22da7cbd3e47a061859defb3caacc283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:32:39 +0900 Subject: [PATCH] =?UTF-8?q?=E5=84=AA=E5=8C=96padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.c | 6 +++--- tcpool.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server.c b/server.c index c5a6fb1..738d2d4 100644 --- a/server.c +++ b/server.c @@ -31,14 +31,14 @@ static inline uint32_t last_nonnull(const char* p, uint32_t max_size); #define TCPOOL_THREADCNT THREADCNT #define TCPOOL_MAXWAITSEC MAXWAITSEC #define TCPOOL_THREAD_CONTEXT \ + ssize_t numbytes; \ + char *dat; \ uint8_t buf[ \ TCPOOL_THREAD_TIMER_T_SZ \ -TCPOOL_THREAD_TIMER_T_HEAD_SZ \ -sizeof(ssize_t) \ -sizeof(char*) \ - ]; \ - ssize_t numbytes; \ - char *dat + ] static dict_t setdicts[THREADCNT]; static uint32_t* items_len; diff --git a/tcpool.h b/tcpool.h index 371bf82..72b12ae 100644 --- a/tcpool.h +++ b/tcpool.h @@ -77,9 +77,9 @@ struct tcpool_thread_timer_t { pthread_cond_t tc; // lock by tmc pthread_mutex_t tmc; // lock tc&hastimerslept pthread_rwlock_t mb; // lock isbusy + TCPOOL_THREAD_CONTEXT; uint8_t isbusy; // lock by mb uint8_t hastimerslept; // lock by tmc - TCPOOL_THREAD_CONTEXT; }; typedef struct tcpool_thread_timer_t tcpool_thread_timer_t;