更新日期: 2022/06/01 来源: https://gitee.com/weharmony/kernel_liteos_a_note
OsMux结构体 参考

#include <los_mux.h>

成员变量

UINT32 magic
 
LosMuxAttr attr
 
LOS_DL_LIST holdList
 
LOS_DL_LIST muxList
 
VOID * owner
 
UINT16 muxCount
 

详细描述

Mutex object.

在文件 los_mux.h73 行定义.

结构体成员变量说明

◆ attr

LosMuxAttr OsMux::attr

Mutex attribute | 互斥锁属性

在文件 los_mux.h75 行定义.

◆ holdList

LOS_DL_LIST OsMux::holdList

The task holding the lock change | 当有任务拿到本锁时,通过holdList节点把锁挂到该任务的锁链表上

在文件 los_mux.h76 行定义.

◆ magic

UINT32 OsMux::magic

magic number | 魔法数字

在文件 los_mux.h74 行定义.

◆ muxCount

UINT16 OsMux::muxCount

Times of locking a mutex | 锁定互斥体的次数,递归锁允许多次

在文件 los_mux.h79 行定义.

◆ muxList

LOS_DL_LIST OsMux::muxList

Mutex linked list | 等这个锁的任务链表,上面挂的都是任务,注意和holdList的区别.

在文件 los_mux.h77 行定义.

◆ owner

VOID* OsMux::owner

The current thread that is locking a mutex | 当前拥有这把锁的任务

在文件 los_mux.h78 行定义.


该结构体的文档由以下文件生成: