aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index f33f831eb3c8..feb773c76ee0 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -346,7 +346,7 @@ static inline void list_splice_tail_init(struct list_head *list,
346 * list_entry - get the struct for this entry 346 * list_entry - get the struct for this entry
347 * @ptr: the &struct list_head pointer. 347 * @ptr: the &struct list_head pointer.
348 * @type: the type of the struct this is embedded in. 348 * @type: the type of the struct this is embedded in.
349 * @member: the name of the list_struct within the struct. 349 * @member: the name of the list_head within the struct.
350 */ 350 */
351#define list_entry(ptr, type, member) \ 351#define list_entry(ptr, type, member) \
352 container_of(ptr, type, member) 352 container_of(ptr, type, member)
@@ -355,7 +355,7 @@ static inline void list_splice_tail_init(struct list_head *list,
355 * list_first_entry - get the first element from a list 355 * list_first_entry - get the first element from a list
356 * @ptr: the list head to take the element from. 356 * @ptr: the list head to take the element from.
357 * @type: the type of the struct this is embedded in. 357 * @type: the type of the struct this is embedded in.
358 * @member: the name of the list_struct within the struct. 358 * @member: the name of the list_head within the struct.
359 * 359 *
360 * Note, that list is expected to be not empty. 360 * Note, that list is expected to be not empty.
361 */ 361 */
@@ -366,7 +366,7 @@ static inline void list_splice_tail_init(struct list_head *list,
366 * list_last_entry - get the last element from a list 366 * list_last_entry - get the last element from a list
367 * @ptr: the list head to take the element from. 367 * @ptr: the list head to take the element from.
368 * @type: the type of the struct this is embedded in. 368 * @type: the type of the struct this is embedded in.
369 * @member: the name of the list_struct within the struct. 369 * @member: the name of the list_head within the struct.
370 * 370 *
371 * Note, that list is expected to be not empty. 371 * Note, that list is expected to be not empty.
372 */ 372 */
@@ -377,7 +377,7 @@ static inline void list_splice_tail_init(struct list_head *list,
377 * list_first_entry_or_null - get the first element from a list 377 * list_first_entry_or_null - get the first element from a list
378 * @ptr: the list head to take the element from. 378 * @ptr: the list head to take the element from.
379 * @type: the type of the struct this is embedded in. 379 * @type: the type of the struct this is embedded in.
380 * @member: the name of the list_struct within the struct. 380 * @member: the name of the list_head within the struct.
381 * 381 *
382 * Note that if the list is empty, it returns NULL. 382 * Note that if the list is empty, it returns NULL.
383 */ 383 */
@@ -387,7 +387,7 @@ static inline void list_splice_tail_init(struct list_head *list,
387/** 387/**
388 * list_next_entry - get the next element in list 388 * list_next_entry - get the next element in list
389 * @pos: the type * to cursor 389 * @pos: the type * to cursor
390 * @member: the name of the list_struct within the struct. 390 * @member: the name of the list_head within the struct.
391 */ 391 */
392#define list_next_entry(pos, member) \ 392#define list_next_entry(pos, member) \
393 list_entry((pos)->member.next, typeof(*(pos)), member) 393 list_entry((pos)->member.next, typeof(*(pos)), member)
@@ -395,7 +395,7 @@ static inline void list_splice_tail_init(struct list_head *list,
395/** 395/**
396 * list_prev_entry - get the prev element in list 396 * list_prev_entry - get the prev element in list
397 * @pos: the type * to cursor 397 * @pos: the type * to cursor
398 * @member: the name of the list_struct within the struct. 398 * @member: the name of the list_head within the struct.
399 */ 399 */
400#define list_prev_entry(pos, member) \ 400#define list_prev_entry(pos, member) \
401 list_entry((pos)->member.prev, typeof(*(pos)), member) 401 list_entry((pos)->member.prev, typeof(*(pos)), member)
@@ -441,7 +441,7 @@ static inline void list_splice_tail_init(struct list_head *list,
441 * list_for_each_entry - iterate over list of given type 441 * list_for_each_entry - iterate over list of given type
442 * @pos: the type * to use as a loop cursor. 442 * @pos: the type * to use as a loop cursor.
443 * @head: the head for your list. 443 * @head: the head for your list.
444 * @member: the name of the list_struct within the struct. 444 * @member: the name of the list_head within the struct.
445 */ 445 */
446#define list_for_each_entry(pos, head, member) \ 446#define list_for_each_entry(pos, head, member) \
447 for (pos = list_first_entry(head, typeof(*pos), member); \ 447 for (pos = list_first_entry(head, typeof(*pos), member); \
@@ -452,7 +452,7 @@ static inline void list_splice_tail_init(struct list_head *list,
452 * list_for_each_entry_reverse - iterate backwards over list of given type. 452 * list_for_each_entry_reverse - iterate backwards over list of given type.
453 * @pos: the type * to use as a loop cursor. 453 * @pos: the type * to use as a loop cursor.
454 * @head: the head for your list. 454 * @head: the head for your list.
455 * @member: the name of the list_struct within the struct. 455 * @member: the name of the list_head within the struct.
456 */ 456 */
457#define list_for_each_entry_reverse(pos, head, member) \ 457#define list_for_each_entry_reverse(pos, head, member) \
458 for (pos = list_last_entry(head, typeof(*pos), member); \ 458 for (pos = list_last_entry(head, typeof(*pos), member); \
@@ -463,7 +463,7 @@ static inline void list_splice_tail_init(struct list_head *list,
463 * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() 463 * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
464 * @pos: the type * to use as a start point 464 * @pos: the type * to use as a start point
465 * @head: the head of the list 465 * @head: the head of the list
466 * @member: the name of the list_struct within the struct. 466 * @member: the name of the list_head within the struct.
467 * 467 *
468 * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). 468 * Prepares a pos entry for use as a start point in list_for_each_entry_continue().
469 */ 469 */
@@ -474,7 +474,7 @@ static inline void list_splice_tail_init(struct list_head *list,
474 * list_for_each_entry_continue - continue iteration over list of given type 474 * list_for_each_entry_continue - continue iteration over list of given type
475 * @pos: the type * to use as a loop cursor. 475 * @pos: the type * to use as a loop cursor.
476 * @head: the head for your list. 476 * @head: the head for your list.
477 * @member: the name of the list_struct within the struct. 477 * @member: the name of the list_head within the struct.
478 * 478 *
479 * Continue to iterate over list of given type, continuing after 479 * Continue to iterate over list of given type, continuing after
480 * the current position. 480 * the current position.
@@ -488,7 +488,7 @@ static inline void list_splice_tail_init(struct list_head *list,
488 * list_for_each_entry_continue_reverse - iterate backwards from the given point 488 * list_for_each_entry_continue_reverse - iterate backwards from the given point
489 * @pos: the type * to use as a loop cursor. 489 * @pos: the type * to use as a loop cursor.
490 * @head: the head for your list. 490 * @head: the head for your list.
491 * @member: the name of the list_struct within the struct. 491 * @member: the name of the list_head within the struct.
492 * 492 *
493 * Start to iterate over list of given type backwards, continuing after 493 * Start to iterate over list of given type backwards, continuing after
494 * the current position. 494 * the current position.
@@ -502,7 +502,7 @@ static inline void list_splice_tail_init(struct list_head *list,
502 * list_for_each_entry_from - iterate over list of given type from the current point 502 * list_for_each_entry_from - iterate over list of given type from the current point
503 * @pos: the type * to use as a loop cursor. 503 * @pos: the type * to use as a loop cursor.
504 * @head: the head for your list. 504 * @head: the head for your list.
505 * @member: the name of the list_struct within the struct. 505 * @member: the name of the list_head within the struct.
506 * 506 *
507 * Iterate over list of given type, continuing from current position. 507 * Iterate over list of given type, continuing from current position.
508 */ 508 */
@@ -515,7 +515,7 @@ static inline void list_splice_tail_init(struct list_head *list,
515 * @pos: the type * to use as a loop cursor. 515 * @pos: the type * to use as a loop cursor.
516 * @n: another type * to use as temporary storage 516 * @n: another type * to use as temporary storage
517 * @head: the head for your list. 517 * @head: the head for your list.
518 * @member: the name of the list_struct within the struct. 518 * @member: the name of the list_head within the struct.
519 */ 519 */
520#define list_for_each_entry_safe(pos, n, head, member) \ 520#define list_for_each_entry_safe(pos, n, head, member) \
521 for (pos = list_first_entry(head, typeof(*pos), member), \ 521 for (pos = list_first_entry(head, typeof(*pos), member), \
@@ -528,7 +528,7 @@ static inline void list_splice_tail_init(struct list_head *list,
528 * @pos: the type * to use as a loop cursor. 528 * @pos: the type * to use as a loop cursor.
529 * @n: another type * to use as temporary storage 529 * @n: another type * to use as temporary storage
530 * @head: the head for your list. 530 * @head: the head for your list.
531 * @member: the name of the list_struct within the struct. 531 * @member: the name of the list_head within the struct.
532 * 532 *
533 * Iterate over list of given type, continuing after current point, 533 * Iterate over list of given type, continuing after current point,
534 * safe against removal of list entry. 534 * safe against removal of list entry.
@@ -544,7 +544,7 @@ static inline void list_splice_tail_init(struct list_head *list,
544 * @pos: the type * to use as a loop cursor. 544 * @pos: the type * to use as a loop cursor.
545 * @n: another type * to use as temporary storage 545 * @n: another type * to use as temporary storage
546 * @head: the head for your list. 546 * @head: the head for your list.
547 * @member: the name of the list_struct within the struct. 547 * @member: the name of the list_head within the struct.
548 * 548 *
549 * Iterate over list of given type from current point, safe against 549 * Iterate over list of given type from current point, safe against
550 * removal of list entry. 550 * removal of list entry.
@@ -559,7 +559,7 @@ static inline void list_splice_tail_init(struct list_head *list,
559 * @pos: the type * to use as a loop cursor. 559 * @pos: the type * to use as a loop cursor.
560 * @n: another type * to use as temporary storage 560 * @n: another type * to use as temporary storage
561 * @head: the head for your list. 561 * @head: the head for your list.
562 * @member: the name of the list_struct within the struct. 562 * @member: the name of the list_head within the struct.
563 * 563 *
564 * Iterate backwards over list of given type, safe against removal 564 * Iterate backwards over list of given type, safe against removal
565 * of list entry. 565 * of list entry.
@@ -574,7 +574,7 @@ static inline void list_splice_tail_init(struct list_head *list,
574 * list_safe_reset_next - reset a stale list_for_each_entry_safe loop 574 * list_safe_reset_next - reset a stale list_for_each_entry_safe loop
575 * @pos: the loop cursor used in the list_for_each_entry_safe loop 575 * @pos: the loop cursor used in the list_for_each_entry_safe loop
576 * @n: temporary storage used in list_for_each_entry_safe 576 * @n: temporary storage used in list_for_each_entry_safe
577 * @member: the name of the list_struct within the struct. 577 * @member: the name of the list_head within the struct.
578 * 578 *
579 * list_safe_reset_next is not safe to use in general if the list may be 579 * list_safe_reset_next is not safe to use in general if the list may be
580 * modified concurrently (eg. the lock is dropped in the loop body). An 580 * modified concurrently (eg. the lock is dropped in the loop body). An