I'm writing a C program with mutex where I need to use the function pthread_mutex_destroy(). Searching on google I read that when this function is called by the thread that has the lock, all others threads that asked for the lock will receive an EDESTROYED error. I tried this on my program but the compiler tells me that EDESTROYED is wrong. Maybe I must import some library containing this error code? I tried to search but I didn't find anything about where EDESTROYED is defined. Can you help me?
Thanks in advance!