pthread_create returns -1?
Hi all.
Anyone had any trouble with pthread_create returning -1? I'm not sure what to do about it, so any and all suggestions would be appreciated!
Thanks in advance!
// Code:
/////////////////////////////////////////////////////////////////
coid *Client(coid *);
void main(){
......
pthread_t clientid[MAXCLIENTS] /* MAXCLIENTS == 32 */
pthread_attr_init(&attr);
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
......
for ( ; ; ){
......
pthread_create(&clientid[i], &attr, Client, (void *) i);
......
}
}