#pragma once #ifndef SERVERWORKER #define SERVERWORKER #include #include #include #include #include /* structure of the args to pass to the worker thread */ typedef struct struct_thread { volatile int *quit; int request_pipe; long connfd; queueT *q; /* pointer to file structure */ taglia_t *taglia; /* pointer to logfile handler */ threadpool_t *pool; /* pointer to threadpool */ pthread_mutex_t *lock; waiting_t **waiting; /* pointer to clients waiting for a lock */ } threadT; /* @brief Function executed by a worker thread to handle a single request from a * client * * @param arg: type that holds all needed resources */ void threadF(void *arg); #endif /* SERVERWORKER */