
# mutex
#### 命令功能
mutex命令用于查看互斥锁的使用情况。
#### 命令格式
mutex
#### 使用指南
该命令依赖于LOSCFG_DEBUG_MUTEX，该宏开关可以通过make menuconfig在菜单项中开启"Enable Mutex Debugging"使能。
```
Debug  ---> Enable a Debug Version ---> Enable Debug LiteOS Kernel Resource ---> Enable Mutex Debugging
```
#### 使用实例
举例：
输入mutex。
#### 输出说明
执行mutex输出互斥锁使用情况：
```
Huawei LiteOS # mutex
used mutexs information: 
Mutex ID <0x0> may leak, Owner is null, TaskEntry of creator: 0x8000711,Latest operation time: 0x0
```
以上各主要输出项含义如下：
| 输出项                   | 说明       |
|:---|:---|
| Mutex ID              | 锁序号      |
| TaskEntry of creator  | 创建锁的接口地址 |
| Latest operation time | 任务最后调度时间 |
   
