static struct hlist_head *pid_hash;

hlist_head is a kernel standard data element used to create doubly linked hash lists (Appendix C describes the structure of such lists and introduces several auxiliary functions for processing them).

pid_hash is used as an array of hlist_heads. The number of elements is determined by the RAM configuration of the machine and lies between 24 = 16 and 212 = 4,096. pidhash_init computes the apt size and allocates the required storage.

Suppose that a new instance of struct pid has been allocated and set up for a given ID type type. It is attached to a task structure as follows:

Continue reading here: Kernelpidc

Was this article helpful?

0 0