<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter 1. 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><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Data Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <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 id="adt"></a>Chapter 1. Data Types</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="adt.html#idm139749907950768">Doubly Linked Lists</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm139749907950768"></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"> — add a new entry </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"> — add a new entry </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"> — deletes entry from list. </span></dt><dt><span class="refentrytitle"><a href="API-list-replace.html"><span class="phrase">list_replace</span></a></span><span class="refpurpose"> — replace old entry by new one </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"> — deletes entry from list and reinitialize it. </span></dt><dt><span class="refentrytitle"><a href="API-list-move.html"><span class="phrase">list_move</span></a></span><span class="refpurpose"> — delete from one list and add as another's head </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"> — delete from one list and add as another's tail </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"> — tests whether <em class="parameter"><code>list</code></em> is the last entry in list <em class="parameter"><code>head</code></em> </span></dt><dt><span class="refentrytitle"><a href="API-list-empty.html"><span class="phrase">list_empty</span></a></span><span class="refpurpose"> — tests whether a list is empty </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"> — tests whether a list is empty and not being modified </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"> — rotate the list to the left </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"> — tests whether a list has just one entry. </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"> — cut a list into two </span></dt><dt><span class="refentrytitle"><a href="API-list-splice.html"><span class="phrase">list_splice</span></a></span><span class="refpurpose"> — join two lists, this is designed for stacks </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"> — join two lists, each list being a queue </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"> — join two lists and reinitialise the emptied list. </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"> — join two lists and reinitialise the emptied list </span></dt><dt><span class="refentrytitle"><a href="API-list-entry.html"><span class="phrase">list_entry</span></a></span><span class="refpurpose"> — get the struct for this entry </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"> — get the first element from a list </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"> — get the first element from a list </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"> — iterate over a list </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"> — iterate over a list backwards </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"> — iterate over a list safe against removal of list entry </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"> — iterate over a list backwards safe against removal of list entry </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"> — iterate over list of given type </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"> — iterate backwards over list of given type. </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"> — prepare a pos entry for use in <code class="function">list_for_each_entry_continue</code> </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"> — continue iteration over list of given type </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"> — iterate backwards from the given point </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"> — iterate over list of given type from the current point </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"> — iterate over list of given type safe against removal of list entry </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"> — continue list iteration safe against removal </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"> — iterate over list from current point safe against removal </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"> — iterate backwards over list safe against removal </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"> — reset a stale list_for_each_entry_safe loop </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"> — iterate over list of given type </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"> — iterate over a hlist continuing after current point </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"> — iterate over a hlist continuing from current point </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"> — iterate over list of given type safe against removal of list entry </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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="API-list-add.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The Linux Kernel API </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">list_add</span></td></tr></table></div></body></html>