Some Linux Kernel codes
Posted: Tue Oct 07, 2014 3:02 am
1)
what does rtnl_link_register really does? what does rtnl stands for?
2)
Also what are differences between INIT_LIST_HEAD and INIT_HLIST_HEAD?
3)
what does free_percpu does?
4) list_for_each_entry_safe verus list_for_each_entry
what's safe means in this case?
5)
can someone describe in word of what's happening above?
Code: Select all
rtnl_link_register(&batadv_link_ops);2)
Code: Select all
INIT_HLIST_HEAD(&bat_priv->gw.list);
INIT_LIST_HEAD(&bat_priv->tt.changes_list);3)
Code: Select all
free_percpu(bat_priv->bat_counters);4) list_for_each_entry_safe verus list_for_each_entry
what's safe means in this case?
5)
Code: Select all
seqno_event = malloc(sizeof(struct seqno_event));
INIT_LIST_HEAD(&seqno_event->list);
list_add_tail(&seqno_event->list, &orig_event->event_list);