Module I-7410 Advanced Linux Kernel Data Structures
Module I-7410 Advanced Linux Kernel Data Structures
Module I-7410 Advanced Linux Kernel Data Structures
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Bern University of Applied Sciences<br />
School of Information Technology TI<br />
Introduction to <strong>Linux</strong> <strong>Kernel</strong> <strong>Data</strong> <strong>Structures</strong><br />
<strong>Kernel</strong> List Macros (1)<br />
<strong>Module</strong>: <strong>Advanced</strong> <strong>Linux</strong><br />
FS-2012<br />
The macros come from file: usr/include/linux/list.h<br />
Macro Name Description<br />
list_add(n,p) Insert a new item pointed to by n right after the item<br />
specified by p. If p points to the list header, you insert<br />
the new item at the list head (beginning).<br />
list_add_tail(n,p) Insert a new item pointed to by n right before<br />
the item specified by p. If p points to the list header,<br />
you insert the new item at the list tail (end).<br />
del(p) Delete an item pointed to by p. Does not free memory<br />
belonging to node p.<br />
list_empty(p) Check if a list starting at the header given by pointer p<br />
is empty.<br />
V1.4 © 2012 by franz.meyer@bfh.ch Slide-6