Alwin and Indan,

Thank you very much for the information.
Yes I can see `ksDebugTCBs` from GDB, I will try it.

Regards,
yf

On Sun, 2024-11-24 at 19:32 +0000, Alwin Joshy via Devel wrote:
> Hey Yanfeng and Indan,
> 
> Assuming you're on debug mode, could you walk the ksDebugTCBs linked list?
> This is what seL4_DumpScheduler does, and from memory, this will print out all
> of the threads on a given core regardless of what state they are in.
> 
> - Alwin
> 
> ________________________________
> From: Indan Zupancic <in...@nul.nu>
> Sent: Sunday, November 24, 2024 10:10 PM
> To: Yanfeng <yfliu2...@qq.com>
> Cc: devel@sel4.systems <devel@sel4.systems>
> Subject: [seL4] Re: find all seL4 threads
> 
> Hello Yanfeng,
> 
> On 2024-11-24 08:06, Yanfeng via Devel wrote:
> > I am wondering when checking a running seL4 target from GDB,
> > how can we find all threads?
> 
> There is no easy way.
> 
> > It seems that `ksReadyQueues[]` only holds a sub set.
> 
> It only hold tasks that want to run now, but can't because
> there is another task running.
> 
> MCS also has a refill queue which holds tasks that want
> to run, but can't because they ran out of budget for
> their period.
> 
> But the main problem is that all tasks not running either
> are suspended or blocked and they are scattered around in
> different queues. They can block on endpoints, notifications
> or be waiting for a reply or a fault handler.
> 
> Every endpoint and notification has its own queues. Suspended
> tasks are not in any queue at all.
> 
> Assuming you allocated all TCB's caps sequentially in your
> initial task's root CNode, finding them through that might
> be the easiest way.
> 
> Greetings,
> 
> Indan
> _______________________________________________
> Devel mailing list -- devel@sel4.systems
> To unsubscribe send an email to devel-leave@sel4.systems
> _______________________________________________
> Devel mailing list -- devel@sel4.systems
> To unsubscribe send an email to devel-leave@sel4.systems

_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to