函数逻辑报告 |
Source Code:kernel\locking\rtmutex.c |
Create Date:2022-07-27 10:52:23 |
| Last Modify:2020-03-17 14:26:38 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Adjust the priority chain
函数原型:static int rt_mutex_adjust_prio_chain(struct task_struct *task, enum rtmutex_chainwalk chwalk, struct rt_mutex *orig_lock, struct rt_mutex *next_lock, struct rt_mutex_waiter *orig_waiter, struct task_struct *top_task)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct task_struct * | task | |
| enum rtmutex_chainwalk | chwalk | |
| struct rt_mutex * | orig_lock | |
| struct rt_mutex * | next_lock | |
| struct rt_mutex_waiter * | orig_waiter | |
| struct task_struct * | top_task |
| 456 | top_waiter等于orig_waiter |
| 461 | bool requeue = true |
| 471 | again : |
| 484 | printk(warning conditions "Maximum lock depth %d reached task: %s (%d)\n", Max number of times we'll walk the boosting chain:, 是否使用FPU, task_pid_nr(top_task)) |
| 488 | put_task_struct(task) |
| 490 | 返回:负EDEADLK |
| 499 | retry : |
| 503 | 关闭本地中断,获取所要保护的运行队列(runqueue)的自旋锁(spinlock),为查找可运行进程做准备。( & Protection of the PI data structures: ) |
| 508 | waiter等于pi_blocked_on |
| 519 | 如果非waiter则转到:out_unlock_pi |
| 526 | 如果orig_waiter且非rt_mutex_owner(orig_lock)则转到:out_unlock_pi |
| 538 | 如果next_lock不等于lock则转到:out_unlock_pi |
| 546 | 如果top_waiter则 |
| 547 | 如果非task_has_pi_waiters(task)则转到:out_unlock_pi |
| 555 | 如果top_waiter不等于task_top_pi_waiter(task)则 |
| 556 | 如果非detect_deadlock则转到:out_unlock_pi |
| 558 | 否则requeue = false |
| 571 | 如果非detect_deadlock则转到:out_unlock_pi |
| 573 | 否则requeue = false |
| 601 | 如果lock恒等于orig_lock或rt_mutex_owner(lock)恒等于top_task则 |
| 603 | raw_spin_unlock( & 保护自旋锁) |
| 605 | 转到:out_unlock_pi |
| 614 | 如果非requeue则 |
| 619 | put_task_struct(task) |
| 625 | 如果非rt_mutex_owner(lock)则 |
| 626 | raw_spin_unlock_irq( & 保护自旋锁) |
| 627 | 返回:0 |
| 631 | task等于get_task_struct(rt_mutex_owner(lock)) |
| 648 | raw_spin_unlock_irq( & 保护自旋锁) |
| 651 | 如果非next_lock则转到:out_put_task |
| 653 | 转到:again |
| 664 | rt_mutex_dequeue(lock, waiter) |
| 685 | rt_mutex_enqueue(lock, waiter) |
| 689 | put_task_struct(task) |
| 698 | 如果非rt_mutex_owner(lock)则 |
| 706 | raw_spin_unlock_irq( & 保护自旋锁) |
| 707 | 返回:0 |
| 711 | task等于get_task_struct(rt_mutex_owner(lock)) |
| 715 | 如果waiter恒等于rt_mutex_top_waiter(lock)则 |
| 723 | rt_mutex_enqueue_pi(task, waiter) |
| 724 | rt_mutex_adjust_prio(task) |
| 726 | 否则如果prerequeue_top_waiter恒等于waiter则 |
| 737 | rt_mutex_dequeue_pi(task, waiter) |
| 738 | waiter等于rt_mutex_top_waiter(lock) |
| 739 | rt_mutex_enqueue_pi(task, waiter) |
| 740 | rt_mutex_adjust_prio(task) |
| 741 | 否则next_lock等于task_blocked_on_lock(task) |
| 767 | raw_spin_unlock_irq( & 保护自旋锁) |
| 776 | 如果非next_lock则转到:out_put_task |
| 784 | 如果非detect_deadlock且waiter不等于top_waiter则转到:out_put_task |
| 787 | 转到:again |
| 789 | out_unlock_pi : |
| 791 | out_put_task : |
| 792 | put_task_struct(task) |
| 794 | 返回:ret |
| 名称 | 描述 |
|---|---|
| task_blocks_on_rt_mutex | Task blocks on lock.* Prepare waiter and propagate pi chain* This must be called with lock->wait_lock held and interrupts disabled |
| remove_waiter | Remove a waiter from a lock and give up* Must be called with lock->wait_lock held and interrupts disabled. I must* have just failed to try_to_take_rt_mutex(). |
| rt_mutex_adjust_pi | Recheck the pi chain, in case we got a priority setting* Called from sched_setscheduler |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |