【发布时间】:2010-09-09 05:24:03
【问题描述】:
在下面的代码中,初始化了一个mutex,NULL的意义是什么。
pthread_mutex_init(&a->monitor,NULL);
我想知道为什么我们将 NULL 作为第二个参数传递。
【问题讨论】:
-
你能不能只阅读 pthread 的手册页:rootr.net/man/man/pthread_mutex_init/3
-
@Martin York-感谢您提供的信息。下次我会记住这一点。