函数逻辑报告 |
Source Code:kernel\locking\osq_lock.c |
Create Date:2022-07-27 10:51:32 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Get a stable @node->next pointer, either for unlock() or unqueue() purposes.* Can return NULL in case we were the last queued and we updated @lock instead.
函数原型:static inline struct optimistic_spin_node *osq_wait_next(struct optimistic_spin_queue *lock, struct optimistic_spin_node *node, struct optimistic_spin_node *prev)
返回类型:struct optimistic_spin_node
参数:
类型 | 参数 | 名称 |
---|---|---|
struct optimistic_spin_queue * | lock | |
struct optimistic_spin_node * | node | |
struct optimistic_spin_node * | prev |
46 | struct optimistic_spin_node * next = NULL |
47 | curr等于We use the value 0 to represent "no CPU", thus the encoded value* will be the CPU number incremented by 1. |
55 | old等于如果prev则coded CPU # + 1 value 否则OSQ_UNLOCKED_VAL |
57 | 循环 |
65 | 退出 |
78 | 如果next则 |
84 | cpu_relax() |
87 | 返回:next |
名称 | 描述 |
---|---|
osq_lock | |
osq_unlock |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |