About the name of 'struct list_head', how about giving an alias for differentiating the usage?

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

 



Hello all,

Often when I analyze linux source code, it takes me some time to figure out
how a list_head member of a struct is being used.
Sometimes it points to a linked list's start member, but sometimes it used
to link the containing struct as a member of linked list.(you know we cat
get the struct in the linked list using container_of operator). Wouldn't it
be nice if we give list_head an alias like 'list_hook_head' (or just
list_hook) so that the alias can be used for the second case? By gradually
changing the type name to list_hook_head in some structs, we could make the
source code more easier to read. I hope someone do this someday..
Thank you.

Chan Kim






_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://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