Changeset c0a91d1 in mainline
- Timestamp:
- 2005-09-20T21:07:58Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e456008
- Parents:
- 4fade3e
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/arch/mips32
r4fade3e rc0a91d1 19 19 20 20 EMULATORS AND VIRTUALIZERS 21 o msim 1.2.7 21 22 o msim 1.2.6 with lwl/lwr/swl/swr patch 22 23 o gxemul - both big and little endian -
include/list.h
r4fade3e rc0a91d1 38 38 }; 39 39 40 41 #define link_initialize(link) { \ 42 (link)->prev = NULL; \43 (link)->next = NULL; \40 static inline void link_initialize(link_t *link) 41 { 42 link->prev = NULL; 43 link->next = NULL; 44 44 } 45 45 46 #define list_initialize(head) { \ 47 (head)->prev = (head); \ 48 (head)->next = (head); \ 46 static inline void list_initialize(link_t *head) 47 { 48 head->prev = head; 49 head->next = head; 49 50 } 50 51 51 #define list_prepend(link, head) { \ 52 (link)->next = (head)->next; \ 53 (link)->prev = (head); \ 54 (head)->next->prev = (link); \ 55 (head)->next = (link); \ 52 static inline void list_prepend(link_t *link, link_t *head) 53 { 54 link->next = head->next; 55 link->prev = head; 56 head->next->prev = link; 57 head->next = link; 56 58 } 57 59 58 #define list_append(link, head) { \ 59 (link)->prev = (head)->prev; \ 60 (link)->next = (head); \ 61 (head)->prev->next = (link); \ 62 (head)->prev = (link); \ 60 static inline void list_append(link_t *link, link_t *head) 61 { 62 link->prev = head->prev; 63 link->next = head; 64 head->prev->next = link; 65 head->prev = link; 63 66 } 64 67 65 #define list_remove(link) { \ 66 (link)->next->prev = (link)->prev; \ 67 (link)->prev->next = (link)->next; \ 68 link_initialize(link); \ 68 static inline void list_remove(link_t *link) 69 { 70 link->next->prev = link->prev; 71 link->prev->next = link->next; 72 link_initialize(link); 69 73 } 70 74 71 #define list_empty(head) (((head)->next == (head))?true:false) 75 static inline bool list_empty(link_t *head) { return head->next == head ? true : false; } 72 76 73 77 #define list_get_instance(link,type,member) (type *)(((__u8*)(link))-((__u8*)&(((type *)NULL)->member)))
Note:
See TracChangeset
for help on using the changeset viewer.