file arch/x86...current.h, definition of per_cpu objects

alex ben aleben358 at gmail.com
Wed Mar 28 02:47:02 EDT 2012


As I understand, the macro current in x86 expands to a function
returning the value in current_task, which is defind for each cpu (is
it?), and the segment register %fs points to a descriptor with a base
address of the offset per-cpu, for (this? all?) per-cpu objects..

So, basically we are reading the object current_task + the offset
contained in the base of the percpu (27th in the GDT) segment..

Could somebody elaborate? thanks



More information about the Kernelnewbies mailing list