Re: about the macro "current" of i386 machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul....


>   can anyone tell me how does the code above give me current task_struct
> structure? and what about current_thread_info() function? is it useless now?
let me try to intepret it for you...

First, to ease our understanding, let's convert :
return x86_read_percpu(current_task)
to:
percpu_from_op("mov", per_cpu__current_task)

ret__ is probably the variable which substitute the name real variable
that is referred by the above "return x86_read_percpu". Assume we hit
the third case ("case 3:"), I think if the asm macro is expanded, we
will see:

mov __percpu_seg(var), ret__

Note: Above is my best guess on what the asm block mean:

So for the final puzzle, could you check what __percpu_seg() means?

regards,

Mulyadi

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux