Re: Macro explanation

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

 



On Mon, Mar 12, 2012 at 10:19 AM, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote:
> On Sun, Mar 11, 2012 at 9:40 PM, Mandeep Sandhu
> <mandeepsandhu.chd@xxxxxxxxx> wrote:
>> On Mon, Mar 12, 2012 at 1:03 AM, Vijay Chauhan <kernel.vijay@xxxxxxxxx> wrote:
>>> On Sat, Mar 10, 2012 at 12:10 AM, Manohar Vanga <manohar.vanga@xxxxxxxxx> wrote:
>>>> Also, from the
>>>> archives: http://www.mail-archive.com/kernelnewbies@xxxxxxxxxxxx/msg12320.html
>>>
>>> Thank you for links which gives good explanation.
>>> But I am not able to understand the part accessing a member through
>>> NULL pointer like ((size_t) &((TYPE *)0)->MEMBER)
>>> How it is handled?
>
> All you are doing is computing the address and not dereferencing it.
> If you dereference it, yes it will panic. eg..
>
> *(((size_t) &((TYPE *)0)->MEMBER)) will cause panic

OK I got it.
Thank you all for your help.

Vijay

>
> --
> Thanks -
> Manish

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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