I use pthread_create(&thread1, &attrs, //... , //...); and need if some condition occured need to kill this thread how to kill this ?
pthread_create(&thread1, &attrs, //... , //...);
pthread_exit(0)
This will kill the thread.