<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 9, 2015 at 6:05 AM, Jeff Haran <span dir="ltr"><<a href="mailto:Jeff.Haran@citrix.com" target="_blank">Jeff.Haran@citrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span><br>
<span style="color:#1f497d">Just pointing out that these lists are circular. Back in the old days we used to call them “rings”.</span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div><div><div>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">From list.h:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">183 /**<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">184 * list_empty - tests whether a list is empty<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">185 * @head: the list to test.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">186 */<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">187 static inline int list_empty(const struct list_head *head)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">188 {<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:5.25pt"><span style="color:#1f497d">189 return head->next == head;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d"> 190 }<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Jeff Haran</span> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br><br></div><div class="gmail_extra">After re-reading the page about linked list in kernelnewbies, I agree it's circular list. I just didn't realize that even after reading carefully the first post<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">regards,<br><br>Mulyadi Santosa<br>Freelance Linux trainer and consultant<br><br>blog: <a href="http://the-hydra.blogspot.com" target="_blank">the-hydra.blogspot.com</a><br>training: <a href="http://mulyaditraining.blogspot.com" target="_blank">mulyaditraining.blogspot.com</a></div>
</div></div>