1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter&#160;1.&#160;Data Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="index.html" title="The Linux Kernel API"><link rel="prev" href="index.html" title="The Linux Kernel API"><link rel="next" href="API-list-add.html" title="list_add"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;1.&#160;Data Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-list-add.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="adt"></a>Chapter&#160;1.&#160;Data Types</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="adt.html#idp1119950572">Doubly Linked Lists</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1119950572"></a>Doubly Linked Lists</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-list-add.html"><span class="phrase">list_add</span></a></span><span class="refpurpose"> &#8212; 
2  add a new entry
3 </span></dt><dt><span class="refentrytitle"><a href="API-list-add-tail.html"><span class="phrase">list_add_tail</span></a></span><span class="refpurpose"> &#8212; 
4     add a new entry
5 </span></dt><dt><span class="refentrytitle"><a href="API---list-del-entry.html"><span class="phrase">__list_del_entry</span></a></span><span class="refpurpose"> &#8212; 
6     deletes entry from list.
7 </span></dt><dt><span class="refentrytitle"><a href="API-list-replace.html"><span class="phrase">list_replace</span></a></span><span class="refpurpose"> &#8212; 
8     replace old entry by new one
9 </span></dt><dt><span class="refentrytitle"><a href="API-list-del-init.html"><span class="phrase">list_del_init</span></a></span><span class="refpurpose"> &#8212; 
10     deletes entry from list and reinitialize it.
11 </span></dt><dt><span class="refentrytitle"><a href="API-list-move.html"><span class="phrase">list_move</span></a></span><span class="refpurpose"> &#8212; 
12     delete from one list and add as another's head
13 </span></dt><dt><span class="refentrytitle"><a href="API-list-move-tail.html"><span class="phrase">list_move_tail</span></a></span><span class="refpurpose"> &#8212; 
14     delete from one list and add as another's tail
15 </span></dt><dt><span class="refentrytitle"><a href="API-list-is-last.html"><span class="phrase">list_is_last</span></a></span><span class="refpurpose"> &#8212; 
16     tests whether <em class="parameter"><code>list</code></em> is the last entry in list <em class="parameter"><code>head</code></em>
17 </span></dt><dt><span class="refentrytitle"><a href="API-list-empty.html"><span class="phrase">list_empty</span></a></span><span class="refpurpose"> &#8212; 
18     tests whether a list is empty
19 </span></dt><dt><span class="refentrytitle"><a href="API-list-empty-careful.html"><span class="phrase">list_empty_careful</span></a></span><span class="refpurpose"> &#8212; 
20     tests whether a list is empty and not being modified
21 </span></dt><dt><span class="refentrytitle"><a href="API-list-rotate-left.html"><span class="phrase">list_rotate_left</span></a></span><span class="refpurpose"> &#8212; 
22     rotate the list to the left
23 </span></dt><dt><span class="refentrytitle"><a href="API-list-is-singular.html"><span class="phrase">list_is_singular</span></a></span><span class="refpurpose"> &#8212; 
24     tests whether a list has just one entry.
25 </span></dt><dt><span class="refentrytitle"><a href="API-list-cut-position.html"><span class="phrase">list_cut_position</span></a></span><span class="refpurpose"> &#8212; 
26     cut a list into two
27 </span></dt><dt><span class="refentrytitle"><a href="API-list-splice.html"><span class="phrase">list_splice</span></a></span><span class="refpurpose"> &#8212; 
28     join two lists, this is designed for stacks
29 </span></dt><dt><span class="refentrytitle"><a href="API-list-splice-tail.html"><span class="phrase">list_splice_tail</span></a></span><span class="refpurpose"> &#8212; 
30     join two lists, each list being a queue
31 </span></dt><dt><span class="refentrytitle"><a href="API-list-splice-init.html"><span class="phrase">list_splice_init</span></a></span><span class="refpurpose"> &#8212; 
32     join two lists and reinitialise the emptied list.
33 </span></dt><dt><span class="refentrytitle"><a href="API-list-splice-tail-init.html"><span class="phrase">list_splice_tail_init</span></a></span><span class="refpurpose"> &#8212; 
34     join two lists and reinitialise the emptied list
35 </span></dt><dt><span class="refentrytitle"><a href="API-list-entry.html"><span class="phrase">list_entry</span></a></span><span class="refpurpose"> &#8212; 
36     get the struct for this entry
37 </span></dt><dt><span class="refentrytitle"><a href="API-list-first-entry.html"><span class="phrase">list_first_entry</span></a></span><span class="refpurpose"> &#8212; 
38     get the first element from a list
39 </span></dt><dt><span class="refentrytitle"><a href="API-list-last-entry.html"><span class="phrase">list_last_entry</span></a></span><span class="refpurpose"> &#8212; 
40     get the last element from a list
41 </span></dt><dt><span class="refentrytitle"><a href="API-list-first-entry-or-null.html"><span class="phrase">list_first_entry_or_null</span></a></span><span class="refpurpose"> &#8212; 
42     get the first element from a list
43 </span></dt><dt><span class="refentrytitle"><a href="API-list-next-entry.html"><span class="phrase">list_next_entry</span></a></span><span class="refpurpose"> &#8212; 
44     get the next element in list
45 </span></dt><dt><span class="refentrytitle"><a href="API-list-prev-entry.html"><span class="phrase">list_prev_entry</span></a></span><span class="refpurpose"> &#8212; 
46     get the prev element in list
47 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each.html"><span class="phrase">list_for_each</span></a></span><span class="refpurpose"> &#8212; 
48     iterate over a list
49 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-prev.html"><span class="phrase">list_for_each_prev</span></a></span><span class="refpurpose"> &#8212; 
50     iterate over a list backwards
51 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-safe.html"><span class="phrase">list_for_each_safe</span></a></span><span class="refpurpose"> &#8212; 
52     iterate over a list safe against removal of list entry
53 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-prev-safe.html"><span class="phrase">list_for_each_prev_safe</span></a></span><span class="refpurpose"> &#8212; 
54     iterate over a list backwards safe against removal of list entry
55 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry.html"><span class="phrase">list_for_each_entry</span></a></span><span class="refpurpose"> &#8212; 
56     iterate over list of given type
57 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-reverse.html"><span class="phrase">list_for_each_entry_reverse</span></a></span><span class="refpurpose"> &#8212; 
58     iterate backwards over list of given type.
59 </span></dt><dt><span class="refentrytitle"><a href="API-list-prepare-entry.html"><span class="phrase">list_prepare_entry</span></a></span><span class="refpurpose"> &#8212; 
60     prepare a pos entry for use in <code class="function">list_for_each_entry_continue</code>
61 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-continue.html"><span class="phrase">list_for_each_entry_continue</span></a></span><span class="refpurpose"> &#8212; 
62     continue iteration over list of given type
63 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-continue-reverse.html"><span class="phrase">list_for_each_entry_continue_reverse</span></a></span><span class="refpurpose"> &#8212; 
64     iterate backwards from the given point
65 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-from.html"><span class="phrase">list_for_each_entry_from</span></a></span><span class="refpurpose"> &#8212; 
66     iterate over list of given type from the current point
67 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-safe.html"><span class="phrase">list_for_each_entry_safe</span></a></span><span class="refpurpose"> &#8212; 
68     iterate over list of given type safe against removal of list entry
69 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-safe-continue.html"><span class="phrase">list_for_each_entry_safe_continue</span></a></span><span class="refpurpose"> &#8212; 
70     continue list iteration safe against removal
71 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-safe-from.html"><span class="phrase">list_for_each_entry_safe_from</span></a></span><span class="refpurpose"> &#8212; 
72     iterate over list from current point safe against removal
73 </span></dt><dt><span class="refentrytitle"><a href="API-list-for-each-entry-safe-reverse.html"><span class="phrase">list_for_each_entry_safe_reverse</span></a></span><span class="refpurpose"> &#8212; 
74     iterate backwards over list safe against removal
75 </span></dt><dt><span class="refentrytitle"><a href="API-list-safe-reset-next.html"><span class="phrase">list_safe_reset_next</span></a></span><span class="refpurpose"> &#8212; 
76     reset a stale list_for_each_entry_safe loop
77 </span></dt><dt><span class="refentrytitle"><a href="API-hlist-for-each-entry.html"><span class="phrase">hlist_for_each_entry</span></a></span><span class="refpurpose"> &#8212; 
78     iterate over list of given type
79 </span></dt><dt><span class="refentrytitle"><a href="API-hlist-for-each-entry-continue.html"><span class="phrase">hlist_for_each_entry_continue</span></a></span><span class="refpurpose"> &#8212; 
80     iterate over a hlist continuing after current point
81 </span></dt><dt><span class="refentrytitle"><a href="API-hlist-for-each-entry-from.html"><span class="phrase">hlist_for_each_entry_from</span></a></span><span class="refpurpose"> &#8212; 
82     iterate over a hlist continuing from current point
83 </span></dt><dt><span class="refentrytitle"><a href="API-hlist-for-each-entry-safe.html"><span class="phrase">hlist_for_each_entry_safe</span></a></span><span class="refpurpose"> &#8212; 
84     iterate over list of given type safe against removal of list entry
85 </span></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="API-list-add.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The Linux Kernel API&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">list_add</span></td></tr></table></div></body></html>
86