problem with get_curretn() function

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

 



hi ,
i am goin through get_current() function as follows:
http://kernelnewbies.org/FAQ/get_current
...........
>>Basically, the task's task_struct and a task's kernel stack occupy an 8KB block that is 8KB aligned, with the task_struct at the beginning and the stack growing from the end downwards. So you can find the task_struct by clearing the bottom 13 bits of the stack pointer value.<<
 
here how can we say that masking only 13 bits we'll get the address of task_struct?

[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