Ejemplo n.º 1
0
void *thread(void *vargp) 
{  
    Pthread_detach(pthread_self()); 
    while (1) { 
	int connfd = sbuf_remove(&sbuf); /* Remove connfd from buffer */
	echo_cnt(connfd);                /* Service client */
	Close(connfd);
    }
}
Ejemplo n.º 2
0
/* thread routine */
void *thread(void *vargp) 
{  
    int connfd = *((int *)vargp);
    Pthread_detach(pthread_self()); 
    Free(vargp);
    echo_cnt(connfd);
    Close(connfd);
    return NULL;
}
Ejemplo n.º 3
0
void *thread(void *vargp)
{
	Pthread_detach(Pthread_self());
	while (1)
	{
		int connfd = sbuf_remove(&sbuf);
		echo_cnt(connfd);
		Close(connfd);
	}
}