static inline void list_add(struct list_head *new, struct list_head *head) { __list_add(new, head, head->next); } 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; } Yaratilgan ro’yxatga element qo’shish mumkin:
list_add ( &first.mylist , &mylinkedlist ) ; list_add ( &second.mylist , &mylinkedlist ) ; Natijada 2 ta element va mylinkedlist o’zgaruvchisi bilan birinchi
elementga ko’rsatkichdan tashkil topgan bog’langan ro’yxatga ega bo’lamiz.
50
Ro’yxat tarkibini ko’rish yoki qadamlarni bajarish uchun tez va samarali
bajariladigan makroslar qo’llaniladi.
Listing 9. Ro’yxat tarkibini ko’rish uchun makros