*参照元 [#z3763011]
#backlinks

*説明 [#wc2ee26a]
-パス: 
--CONFIG_DEBUG_LIST が無効のとき: [[linux-2.6.33/include/linux/list.h]]
--CONFIG_DEBUG_LIST が有効のとき: [[linux-2.6.33/lib/list_debug.c]]

-FIXME: これは何?
--説明


**引数 [#id6cee4a]
-struct list_head *new
--
--[[linux-2.6.33/list_head]]
struct list_head *prev
--
struct list_head *next
--


**返り値 [#w67b7b3e]
-なし


**参考 [#d64ef9a2]


*実装 [#o4e11728]

**CONFIG_DEBUG_LIST が有効のとき(include/linux/list.h) [#s88067c5]
 /*
  * Insert a new entry between two known consecutive entries.
  *
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
 #ifndef CONFIG_DEBUG_LIST
-
--[[linux-2.6.33/CONFIG_DEBUG_LIST]]

 static inline void __list_add(struct list_head *new,
 			      struct list_head *prev,
 			      struct list_head *next)
 {
 	next->prev = new;
 	new->next = next;
 	new->prev = prev;
 	prev->next = new;
 }
 #else
 extern void __list_add(struct list_head *new,
 			      struct list_head *prev,
 			      struct list_head *next);
 #endif




**CONFIG_DEBUG_LIST が無効のとき(lib/list_debug.c) [#b445e8d1]
 /*
  * Insert a new entry between two known consecutive entries.
  *
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
 
 void __list_add(struct list_head *new,
 			      struct list_head *prev,
 			      struct list_head *next)
 {
 	WARN(next->prev != prev,
 		"list_add corruption. next->prev should be "
 		"prev (%p), but was %p. (next=%p).\n",
 		prev, next->prev, next);
 	WARN(prev->next != next,
 		"list_add corruption. prev->next should be "
 		"next (%p), but was %p. (prev=%p).\n",
 		next, prev->next, prev);
-
--[[linux-2.6.33/WARN()]]

 	next->prev = new;
 	new->next = next;
 	new->prev = prev;
 	prev->next = new;
 }
 EXPORT_SYMBOL(__list_add);
-モジュールのライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]


*コメント [#a16303db]


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS