Re: Unfamiliar C syntax in HLIST_HEAD_INIT

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

 



On 1/21/07, Eric <eylin2004@xxxxxxxxx> wrote:
While reading the kernel source, I noticed this macro:


#define HLIST_HEAD_INIT { .first = NULL }
   This is a feature of C99 standard that allows one to point out a
particular element of structure, union or array to be initialized.
This provides the advantages: the elements can be initialized in any
order, more clarity and some of the elements can be omitted  in the
initialization list in which case they would be intialized as if they
were static objects.

My question is, what is the dot notation in ".first"?
 The ".member_name "  is the syntax to identify the element in the
struct  that requires to be initialized.

Thayumanavar S.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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