[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-newbie
Subject:    how to retrieve the struct task_struct currently running on a CPU without using get_current()
From:       William Tambe <tambewilliam () gmail ! com>
Date:       2019-10-15 23:27:14
Message-ID: CAF8i9mPhEoGYf9eGWtsCrrUFGwuEYptkD-uP60VM3MHBOdobDQ () mail ! gmail ! com
[Download RAW message or body]

How to retrieve the struct task_struct currently running on a CPU
without using get_current().

In fact, on most architectures, get_current() relies on the
stack-pointer register, but in a situation where the stack-pointer
register is not set to the stack of the current task on a CPU, how can
one retrieve the task currently running on that CPU ?

Is the answer reading it directly from the CPU running queue ? if yes,
what function can be used ?
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic