* About the name of 'struct list_head', how about giving an alias for differentiating the usage?
@ 2023-07-03 5:47 Chan Kim
0 siblings, 0 replies; only message in thread
From: Chan Kim @ 2023-07-03 5:47 UTC (permalink / raw)
To: kernelnewbies
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@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-03 5:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03 5:47 About the name of 'struct list_head', how about giving an alias for differentiating the usage? Chan Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).