函数逻辑报告 |
Source Code:kernel\locking\semaphore.c |
Create Date:2022-07-27 10:48:09 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Because this function is inlined, the 'state' parameter will be* constant, and thus optimised away by the compiler. Likewise the* 'timeout' parameter for the cases without timeouts.
函数原型:static inline int __sched __down_common(struct semaphore *sem, long state, long timeout)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct semaphore * | sem | |
| long | state | |
| long | timeout |
| 209 | 添加链表项 |
| 211 | up = false |
| 213 | 循环 |
| 214 | 如果signal_pending_state(state, 当前进程)则转到:interrupted |
| 216 | 如果此条件成立可能性小(为编译器优化)(timeout <= 0)则转到:timed_out |
| 219 | raw_spin_unlock_irq( & lock) |
| 220 | timeout等于schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed |
| 222 | 如果up则返回:0 |
| 226 | timed_out : |
| 227 | 删除链表项 |
| 228 | 返回:负ETIME |
| 230 | interrupted : |
| 231 | 删除链表项 |
| 232 | 返回:负EINTR |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |