style and fixed bug allocating too much memory in append file
This commit is contained in:
@ -9,19 +9,25 @@
|
||||
#include <taglialegna.h>
|
||||
#include <threadpool.h>
|
||||
|
||||
// struttura dati che contiene gli argomenti da passare ai worker threads
|
||||
/* structure of the args to pass to the worker thread */
|
||||
typedef struct struct_thread {
|
||||
volatile int *quit;
|
||||
int request_pipe;
|
||||
long connfd;
|
||||
queueT *q; // puntatore alla queue dei file
|
||||
taglia_t *taglia; // puntatore alla struct del file di log
|
||||
threadpool_t *pool; // puntatore alla threadpool
|
||||
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; // puntatore ai client in attesa di ottenere la lock su un file
|
||||
waiting_t **waiting; /* pointer to clients waiting for a lock */
|
||||
} threadT;
|
||||
|
||||
// funzione eseguita dal generico Worker del pool di thread
|
||||
|
||||
|
||||
/* @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 */
|
||||
|
||||
Reference in New Issue
Block a user