Join two lists. */
| 107 | |
| 108 | /* Join two lists. */ |
| 109 | static inline void list_splice(struct list_head *add, struct list_head *head) |
| 110 | { |
| 111 | /* Do nothing if the list which gets added is empty. */ |
| 112 | if (add != add->next) { |
| 113 | add->next->prev = head; |
| 114 | add->prev->next = head->next; |
| 115 | head->next->prev = add->prev; |
| 116 | head->next = add->next; |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | /* Get typed element from list at a given position. */ |
| 121 | #define list_entry(ptr, type, member) \ |