Function report |
Source Code:arch\x86\kernel\process.c |
Create Date:2022-07-28 07:48:53 |
| Last Modify:2020-03-16 17:03:44 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Called from fs/proc with a reference on @p to find the function* which called into schedule(). This needs to be done carefully* because the task might wake up and we might look at a stack* changing under us.
Proto:unsigned long get_wchan(struct task_struct *p)
Type:unsigned long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | p |
| 931 | ret = 0 |
| 932 | count = 0 |
| 934 | If p == current process || run state == Used in tsk->state: Then Return 0 |
| 937 | If Not try_get_task_stack(p) Then Return 0 |
| 940 | start = task_stack_page(p) |
| 960 | top = start + THREAD_SIZE - TOP_OF_KERNEL_STACK_PADDING |
| 969 | Do |
| 972 | ip = Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need* to hide memory access from KASAN.( * (unsignedlong * )(fp + sizeof(unsignedlong))) |
| 973 | If Not Is this address in the __sched functions? Then |
| 977 | fp = Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need* to hide memory access from KASAN.( * (unsignedlong * )fp) |
| 978 | When count++ < 16 && run state != Used in tsk->state: cycle |
| 980 | out : |
| 981 | put_task_stack(p) |
| 982 | Return ret |
| 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 |