doc: mutex文档

This commit is contained in:
fslongjin
2022-07-31 17:27:43 +08:00
parent 946bbef392
commit 311a6181b5
2 changed files with 65 additions and 3 deletions

View File

@ -17,8 +17,8 @@ typedef struct
{
atomic_t count; // 锁计数。1->已解锁。 0->已上锁,且有可能存在等待者
spinlock_t wait_lock;
struct List wait_list;
spinlock_t wait_lock; // mutex操作锁用于对mutex的list的操作进行加锁
struct List wait_list; // Mutex的等待队列
} mutex_t;
/**