Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
静态初始化递归互斥体时,有什么区别
static pthread_mutex_t foo_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
和
static pthread_mutex_t foo_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
为什么我要一个而不是另一个?
“_NP”表示该功能是不可移植的。为了保留提示,您最好使用“_NP”版本。
除此之外,我怀疑没有区别。不过,也不是 100% 确定。