the data structure -- doubly linked chains:

Bert doclzs at 21cn.com
Thu Nov 27 10:14:19 UTC 2003


(1)what is the order of nodes in the chains?
it is like the head, the first, the second, ..., 
the last, the tail or the head is also the first
and the tail is also the last?

(2)the function:

RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain 
)
{
  return (Chain_Node *) &the_chain->permanent_null;
}

is it necessary to use the operator "&" ?

is it right to implement the function as follows:

RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain 
)
{
  return (Chain_Node *) (the_chain->last)->next;
}

----------------------------------------------
ÍæÓÎÏ·Ó®ÊýÂëÏà»ú¡¢MP3¡¢UÅÌ 
http://mail.21cn.com/huodong/0310/ 
×îHOT°ËØÔÐÂÎÅ£¬×îINʱÉпáͼ£¬¾¡ÔÚ21CN»¨»¨ÖÐÐÄ 
http://news.21cn.com/huahua/ 
¹ã¶«ADSLÓû§ÓÐ×ÅÊý£¬21CNÉÌÎñÓÊÃâ·ÑÁì 
http://mail.21cn.com/huodong/0310/ 
¹ãÖݸßУÇéÂÂÔâÇÀ ÄÐÉú¶·´õͽѪÈ÷У԰(ͼ) 
http://news.21cn.com/social/ 






More information about the users mailing list