多线程编程指南

进程内的互斥锁

#include <thread.h>



mutex_t mp;

int ret;



/* to be used within this process only */

ret = mutex_init(&mp, USYNC_THREAD, 0);