Re: About head of kernel linked list structure

2015-05-10 Thread Mulyadi Santosa
On Sat, May 9, 2015 at 6:05 AM, Jeff Haran jeff.ha...@citrix.com wrote: Just pointing out that these lists are circular. Back in the old days we used to call them rings. From list.h: 183 /** 184 * list_empty - tests whether a list is empty 185 * @head: the list to test. 186 */

RE: About head of kernel linked list structure

2015-05-08 Thread Jeff Haran
From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Mulyadi Santosa Sent: Thursday, May 07, 2015 3:53 AM To: Huaicheng Li Cc: kernelnewbies Subject: Re: About head of kernel linked list structure On Wed, May 6, 2015 at 5:39 PM

Re: About head of kernel linked list structure

2015-05-08 Thread Mulyadi Santosa
On Wed, May 6, 2015 at 5:39 PM, Huaicheng Li lhc...@gmail.com wrote: In my understanding, the head initialised using LIST_HEAD_INIT or defined by LIST_HEAD corresponds to no *real* data field. But it *does* have its own _next_ and _prev_ pointers. The _next_ pointer points to the first real

Re: About head of kernel linked list structure

2015-05-07 Thread Bernd Petrovitsch
Hi all! On Don, 2015-05-07 at 17:57 +0700, Mulyadi Santosa wrote: On Wed, May 6, 2015 at 5:39 PM, Huaicheng Li lhc...@gmail.com wrote: In my understanding, the head initialised using LIST_HEAD_INIT or defined by LIST_HEAD corresponds to no *real* data field. But it *does* have its own

Re: About head of kernel linked list structure

2015-05-07 Thread Robert P. J. Day
On Thu, 7 May 2015, Huaicheng Li wrote: Hi Robert, You got my point and I’m sorry for not stating it in a clear way. You are right about the prev-to-left and next-to-right when drawing the line. At that time, I just wanted to show which node they were pointing at. Anyway, you solved my

Re: About head of kernel linked list structure

2015-05-07 Thread Huaicheng Li
Hi Robert, You got my point and I’m sorry for not stating it in a clear way. You are right about the prev-to-left and next-to-right when drawing the line. At that time, I just wanted to show which node they were pointing at. Anyway, you solved my puzzle. Also thanks for your excellent

Re: About head of kernel linked list structure

2015-05-07 Thread Mulyadi Santosa
On Wed, May 6, 2015 at 5:39 PM, Huaicheng Li lhc...@gmail.com wrote: In my understanding, the head initialised using LIST_HEAD_INIT or defined by LIST_HEAD corresponds to no *real* data field. But it *does* have its own _next_ and _prev_ pointers. The _next_ pointer points to the first real

About head of kernel linked list structure

2015-05-06 Thread Huaicheng Li
In my understanding, the head initialised using LIST_HEAD_INIT or defined by LIST_HEAD corresponds to no *real* data field. But it *does* have its own _next_ and _prev_ pointers. The _next_ pointer points to the first real node in the doubly linked list, and the _prev_ pointer points to the

Re: About head of kernel linked list structure

2015-05-06 Thread Robert P. J. Day
On Wed, 6 May 2015, Huaicheng Li wrote: In my understanding, the head initialised using LIST_HEAD_INIT or defined by LIST_HEAD corresponds to no *real* data field. correct. a better way to describe it would be that it corresponds to no real enclosing payload, so it should never be