Function report |
Source Code:kernel\sched\core.c |
Create Date:2022-07-28 09:36:59 |
| Last Modify:2022-05-22 13:40:38 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:yield_to - yield the current processor to another thread in* your thread group, or accelerate that thread toward the* processor it's on
Proto:int __sched yield_to(struct task_struct *p, bool preempt)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | p | |
| bool | preempt |
| 5710 | curr = current process |
| 5713 | yielded = 0 |
| 5715 | local_irq_save(flags) |
| 5718 | again : |
| 5732 | Go to again |
| 5735 | If Not yield_to_task Then Go to out_unlock |
| 5738 | If sched_class != sched_class Then Go to out_unlock |
| 5741 | If task_running(p_rq, p) || run state Then Go to out_unlock |
| 5744 | yielded = yield_to_task(rq, p, preempt) |
| 5745 | If yielded Then |
| 5746 | schedstat_inc(yld_count) |
| 5755 | out_unlock : |
| 5757 | out_irq : |
| 5758 | local_irq_restore(flags) |
| 5763 | Return yielded |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |