I'm using pthread.h
and using the following functions:
//
// Cria A thread
//
thread_argsPP[contthreadsPP] = contthreadsPP;
pthread_create(&threadsPP[contthreadsPP], NULL, ReceivePinPad, (void *) &thread_argsPP[contthreadsPP]);
//
// Inicia a thread
//
pthread_join(threadsPP[contthreadsPP], NULL);
//
// Fecha a thread Recive
//
pthread_detach(pthread_self());
pthread_exit(NULL);
But after closing the thread I can not recreate it, I would like to know if it has any way to reuse a pthread after pthread_exit(NULL)
.