Http://blog.csdn.net/hemmanhui/archive/2009/07/15/4346368.aspx
Http://blog.csdn.net/stefmoon/archive/2010/04/10/5469607.aspx
[Linux] pthread_mutex_lock and pthread_spin_lock Performance
Http://blog.csdn.net/wwwsq/archive/2009/04/15/4075129.aspx
Int X; // global variable in the process
Pthread_mutex_t mutex;
Pthread_mutex_init (& mutex, null); // initialize mutex variable mutex Based on the default attribute
Pthread_mutex_lock (& mutex); // lock the mutex variable
... // Operations on variable X
Phtread_mutex_unlock (& mutex); // unlock the mutex variable
Is it... // Variables in the operations on variable X are mutually exclusive. Which variables are protected by mutex? How to Use
Delete reply not displayedShow all repliesShow star repliesShow score reply
Initialization of the pthread_mutex_t variable
Http://topic.csdn.net/t/20050823/14/4226188.html