style and comments for threadpool.c
This commit is contained in:
@ -10,8 +10,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <util.h>
|
#include "util.h"
|
||||||
#include <threadpool.h>
|
#include "threadpool.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @function void *threadpool_thread(void *threadpool)
|
* @function void *threadpool_thread(void *threadpool)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define _MESSAGE_H
|
#define _MESSAGE_H
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tipo del messaggio
|
* message structure that get sent from the client
|
||||||
*/
|
*/
|
||||||
typedef struct msg {
|
typedef struct msg {
|
||||||
long len;
|
long len;
|
||||||
|
|||||||
@ -2,11 +2,12 @@
|
|||||||
#ifndef _SERVER_UTIL
|
#ifndef _SERVER_UTIL
|
||||||
#define _SERVER_UTIL
|
#define _SERVER_UTIL
|
||||||
|
|
||||||
#include <ini.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include "ini.h"
|
||||||
|
|
||||||
#define CONFGETINT(var, config, t, q, p, base) \
|
#define CONFGETINT(var, config, t, q, p, base) \
|
||||||
var = (int) strtol(ini_get(config, t, q), p, base); \
|
var = (int) strtol(ini_get(config, t, q), p, base); \
|
||||||
if(var<=0) { \
|
if(var<=0) { \
|
||||||
|
|||||||
@ -12,7 +12,8 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strsep_gnu.h>
|
|
||||||
|
#include "strsep_gnu.h"
|
||||||
|
|
||||||
char *
|
char *
|
||||||
strsep_gnu (char **stringp, const char *delim)
|
strsep_gnu (char **stringp, const char *delim)
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
#ifndef _UTIL_H
|
#ifndef _UTIL_H
|
||||||
#define _UTIL_H
|
#define _UTIL_H
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <pthread.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <unistd.h>
|
||||||
#include <pthread.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#if !defined(BUFSIZE)
|
#if !defined(BUFSIZE)
|
||||||
#define BUFSIZE 256
|
#define BUFSIZE 256
|
||||||
@ -62,8 +62,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Procedura di utilita' per la stampa degli errori
|
* @brief Procedura di utilita' per la stampa degli errori
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
static inline void print_error(const char * str, ...) {
|
static inline void print_error(const char * str, ...) {
|
||||||
const char err[]="ERROR: ";
|
const char err[]="ERROR: ";
|
||||||
|
|||||||
Reference in New Issue
Block a user