Where in the linux kernel do a task get:
1. "wakeuped" - that is after a task being blocked and the resource it been waiting for gets free, the task gets woken up, where in the kernel code do this happen? Some signal sent? Or is every task that gets "enqueued" in kernel/sched_rt.c - enqueue_task_rt() woken up:ed?
2. blocked, when a task gets blocked where in the kernel code is it taken of the cpu? Can I get the time of this from schedule() in kernel/sched.c? how? even if I work in the real-time class?
3. preempted, when a higher priority task gets runnable, where in the code do the current task get of the cpu and put back into a running queue? Can I get the time of this from schedule() in kernel/sched.c? how? even if I work in the real-time class?
I'm going to implement a custom scheduler so I need to get the time of these events. I'm thankful for any help, tips is also welcome.
I'm working in the real-time class and the 22.214.171.124 kernel