Possible Duplicate:
Multiple arguments to function called by pthread_create()?
How to pass more than one value as an argument to a thread in C?
I have these structures:
struct Request {
char buf[MAXLENREQ];
char inf[MAXLENREQ]; /* buffer per richiesta INF */
int lenreq;
uint16_t port; /* porta server */
struct in_addr serveraddr; /* ip server sockaddr_in */
char path[MAXLENPATH];
/*struct Range range;*/
};
struct RequestGet {
char buf[MAXLENREQ];
int maxconnect;
struct Range range;
};
struct ResponseGet{
char buf[MAXLENDATA];
//int LenRange;
int expire;
char dati[MAXLENDATA];
struct Range range;
};
How can I pass them to pthread_create
? No matter about the meanings of each field of structures.
pthread_create(&id,NULL,thread_func,????HERE????);