2、 /**< inherit from ipc_object *///派生自IPC对象 7. 8. rt_uint16_t value; /**< value of mutex *///此互斥锁的值 9. 10. rt_uint8_t original_priority; /**< priority of last thread hold the mutex *
3、///原始优先级,即此互斥锁拥有者线程的优先级 11. rt_uint8_t hold; /**< numbers of thread hold the mutex *///此互斥锁当前已被几个线程(同一线程)take的次数 12. 13. struct rt_thread *owner; /**< current owner of mutex *///此互斥锁的拥有者线程 14.
7、允许同一时间只有一个线程拥有这个互斥锁,此参数就是用来记录此线程的.2初始化及创建互斥锁2.1初始化互斥锁[cpp]viewplaincopyprint?1./** 2. * This function will initialize a mutex and put it under control of resource 3. * management. 4. * 5. * @param mutex the mutex object 6. * @param name the name of mutex 7. * @par
8、am flag the flag of mutex 8. * 9. * @return the operation status, RT_EOK on successful 10. */ 11.rt_err_t rt_mutex_init(rt_mutex_t mutex, const char *n