#define LIST_HEAD_INIT(name) {&(name), &(nmae)}

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

 



On Mon, Jun 22, 2009 at 04:16:36PM -0700, hong zhang wrote:
> 
> List,
> 
> I need a C mailing list to post my C question from kernel. Could
> anyone recommend a good one to me?

kernelnewbies usually handles kernel-related C questions quite well.
Have you tried that?

> Currently I subscripe 
> 
> comp.lang.c
> http://groups.google.com/group/comp.lang.c?hl=en
> 
> #define LIST_HEAD_INIT(name) {&(name), &(nmae)}
> bothers me.
> 
> What is { &(name), &(name)} for?
> I do not see this kind of statement in C codes before.

It creates a list that points to itself, registering the first two
fields of the structure to be pointers.

Run cpp to see the exact output if you are still confused.

thanks,

greg k-h


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux