When statically initializing a recursive mutex, what is the difference between
static pthread_mutex_t foo_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
and
static pthread_mutex_t foo_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
and why should I want the one instead of the other?
"_NP" is meant as a hint that the feature is nonportable. In order to keep the hint there, you are best off to use the "_NP" version.
Other than that I suspect there is no difference. Not 100% sure, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With