Hi Vijay,
On Fri, Sep 16, 2011 at 5:16 AM, Vijay Chauhan wrote:
>> It's the same thing as you read:
>> THREAD size is 8kb so the operation looks like the following:
>> current_stack_pointer & ~(8191) == current_stack_pointet & 0xFE00
>> (last 13 bits are 0)
>
> Ok. Got it.
>
> But how ANDing
> It's the same thing as you read:
> THREAD size is 8kb so the operation looks like the following:
> current_stack_pointer & ~(8191) == current_stack_pointet & 0xFE00
> (last 13 bits are 0)
Ok. Got it.
But how ANDing it with current stack pointer points to the address of
thread_info structure
It's the same thing as you read:
THREAD size is 8kb so the operation looks like the following:
current_stack_pointer & ~(8191) == current_stack_pointet & 0xFE00
(last 13 bits are 0)
On Fri, Sep 16, 2011 at 3:38 PM, Vijay Chauhan wrote:
> Hi list,
>
> I would like to know how the thread_info a
Hi list,
I would like to know how the thread_info address is calculated? As per
the LKD book:
struct thread_info is stored on the kernel stack. On x86, current is
calculated by masking out the 13 least-significant bits of the stack
pointer to obtain the thread_info structure.This is done by the
cu