How do I determine thread index in its thread group from inside of the kernel?
I need, for a given thread group, to get each of its member threads sequential index to store some data about each thread from inside of the kernel, I have access to task_struct
. Something like “0th thread was created first, 1st thread is created second, …” would work fine.