#include <los_rwlock.h>
成员变量 | |
INT32 | magic:24 |
INT32 | rwCount:8 |
VOID * | writeOwner |
LOS_DL_LIST | readList |
LOS_DL_LIST | writeList |
Rwlock object.
在文件 los_rwlock.h 第 52 行定义.
INT32 OsRwlock::magic |
Magic number | 魔法数字 为什么要用魔法数字 ?
在文件 los_rwlock.h 第 53 行定义.
LOS_DL_LIST OsRwlock::readList |
Read waiting list | 等待读操作的任务链表
在文件 los_rwlock.h 第 59 行定义.
INT32 OsRwlock::rwCount |
Times of locking the rwlock, rwCount > 0 when rwkick is read mode, rwCount < 0 when the rwlock is write mode, rwCount = 0 when the lock is free. 大于0时为读模式 , 小于0时为写模式 等于0为自由模式 rwCount为读锁和写锁的数量,注意它们并不是此消彼长的行为模式
在文件 los_rwlock.h 第 54 行定义.
LOS_DL_LIST OsRwlock::writeList |
Write waiting list | 等待写操作的任务链表
在文件 los_rwlock.h 第 60 行定义.
VOID* OsRwlock::writeOwner |
The current write thread that is locking the rwlock | 拥有写权限的任务
在文件 los_rwlock.h 第 58 行定义.