diff options
author | RajithaY <rajithax.yerrumsetty@intel.com> | 2017-04-25 03:31:15 -0700 |
---|---|---|
committer | Rajitha Yerrumchetty <rajithax.yerrumsetty@intel.com> | 2017-05-22 06:48:08 +0000 |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/seabios/src/list.h | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/seabios/src/list.h')
-rw-r--r-- | qemu/roms/seabios/src/list.h | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/qemu/roms/seabios/src/list.h b/qemu/roms/seabios/src/list.h deleted file mode 100644 index 94512e306..000000000 --- a/qemu/roms/seabios/src/list.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef __LIST_H -#define __LIST_H - -#include "types.h" // container_of - - -/**************************************************************** - * hlist - Double linked lists with a single pointer list head - ****************************************************************/ - -struct hlist_node { - struct hlist_node *next, **pprev; -}; - -struct hlist_head { - struct hlist_node *first; -}; - -static inline int -hlist_empty(const struct hlist_head *h) -{ - return !h->first; -} - -static inline void -hlist_del(struct hlist_node *n) -{ - struct hlist_node *next = n->next; - struct hlist_node **pprev = n->pprev; - *pprev = next; - if (next) - next->pprev = pprev; -} - -static inline void -hlist_add(struct hlist_node *n, struct hlist_node **pprev) -{ - struct hlist_node *next = *pprev; - n->pprev = pprev; - n->next = next; - if (next) - next->pprev = &n->next; - *pprev = n; -} - -static inline void -hlist_add_head(struct hlist_node *n, struct hlist_head *h) -{ - hlist_add(n, &h->first); -} - -static inline void -hlist_add_before(struct hlist_node *n, struct hlist_node *next) -{ - hlist_add(n, next->pprev); -} - -static inline void -hlist_add_after(struct hlist_node *n, struct hlist_node *prev) -{ - hlist_add(n, &prev->next); -} - -static inline void -hlist_replace(struct hlist_node *old, struct hlist_node *new) -{ - new->next = old->next; - if (new->next) - new->next->pprev = &new->next; - new->pprev = old->pprev; - *new->pprev = new; -} - -#define hlist_for_each_entry(pos, head, member) \ - for (pos = container_of((head)->first, typeof(*pos), member) \ - ; pos != container_of(NULL, typeof(*pos), member) \ - ; pos = container_of(pos->member.next, typeof(*pos), member)) - -#define hlist_for_each_entry_safe(pos, n, head, member) \ - for (pos = container_of((head)->first, typeof(*pos), member) \ - ; pos != container_of(NULL, typeof(*pos), member) \ - && ({ n = pos->member.next; 1; }) \ - ; pos = container_of(n, typeof(*pos), member)) - -#define hlist_for_each_entry_pprev(pos, pprev, head, member) \ - for (pprev = &(head)->first \ - ; *pprev && ({ pos=container_of(*pprev, typeof(*pos), member); 1; }) \ - ; pprev = &(*pprev)->next) - - -#endif // list.h |