What is the practice on comparing a pthread_t variable to int. I display a list of all thread ids and I take in input from the user specifying which thread to kill, using the id. So how do I compare the input from the user to all of the pthread_t variables.
Share
You don’t. The type
pthread_tis opaque: it need not be an integer. You should instead use thepid_tas returned bygettid.