I am writing a program with several critical sections. The thing is, I need to check the value of the mutex in the if statement.
I would like to do something like this:
if pthread_mutex(&mutex) == 0
else if pthread_mutex(&mutex) == 1
Is it possible?
user427390
source
share