diff options
| author | Jiri Kosina <[email protected]> | 2024-01-08 20:57:04 +0100 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2024-01-08 20:57:04 +0100 |
| commit | 6b93f350e55f3f2ee071dd41109d936abfba8ebf (patch) | |
| tree | 481336b357ef1c1ac4a3a7517dd20294fe9b1c45 /scripts/gdb/linux/tasks.py | |
| parent | b0a1fe4610de5761a66de0e43540fc3d59638402 (diff) | |
| parent | 584f35a3647d42980af495fc0bc5c51eb174aa35 (diff) | |
Merge branch 'for-6.8/amd-sfh' into for-linus
- addition of new interfaces to export User presence information and
Ambient light from amd-sfh to other drivers within the kernel (Basavaraj
Natikar)
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
| -rw-r--r-- | scripts/gdb/linux/tasks.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 17ec19e9b5bf..aa5ab6251f76 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py @@ -13,7 +13,7 @@ import gdb -from linux import utils +from linux import utils, lists task_type = utils.CachedType("struct task_struct") @@ -22,19 +22,15 @@ task_type = utils.CachedType("struct task_struct") def task_lists(): task_ptr_type = task_type.get_type().pointer() init_task = gdb.parse_and_eval("init_task").address - t = g = init_task + t = init_task while True: - while True: - yield t + thread_head = t['signal']['thread_head'] + for thread in lists.list_for_each_entry(thread_head, task_ptr_type, 'thread_node'): + yield thread - t = utils.container_of(t['thread_group']['next'], - task_ptr_type, "thread_group") - if t == g: - break - - t = g = utils.container_of(g['tasks']['next'], - task_ptr_type, "tasks") + t = utils.container_of(t['tasks']['next'], + task_ptr_type, "tasks") if t == init_task: return |