--- libeio/etp.c 2015/06/25 18:12:53 1.7 +++ libeio/etp.c 2015/06/25 18:14:19 1.8 @@ -107,6 +107,24 @@ int size; } etp_reqq; +typedef struct etp_pool *etp_pool; + +typedef struct etp_worker +{ + etp_pool pool; + + struct etp_tmpbuf tmpbuf; + + /* locked by pool->wrklock */ + struct etp_worker *prev, *next; + + xthread_t tid; + +#ifdef ETP_WORKER_COMMON + ETP_WORKER_COMMON +#endif +} etp_worker; + struct etp_pool { void *userdata; @@ -136,24 +154,6 @@ etp_worker wrk_first; }; -typedef struct etp_pool *etp_pool; - -typedef struct etp_worker -{ - etp_pool pool; - - struct etp_tmpbuf tmpbuf; - - /* locked by pool->wrklock */ - struct etp_worker *prev, *next; - - xthread_t tid; - -#ifdef ETP_WORKER_COMMON - ETP_WORKER_COMMON -#endif -} etp_worker; - #define ETP_WORKER_LOCK(wrk) X_LOCK (pool->wrklock) #define ETP_WORKER_UNLOCK(wrk) X_UNLOCK (pool->wrklock) @@ -420,7 +420,7 @@ if (xthread_create (&wrk->tid, etp_proc, (void *)wrk)) { - wrk->prev = &wpool->rk_first; + wrk->prev = &pool->wrk_first; wrk->next = pool->wrk_first.next; pool->wrk_first.next->prev = wrk; pool->wrk_first.next = wrk;