X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_list.h;h=9bcf7f8371dba11a21eaf88083d68c154fe4de93;hb=abffcb058993b19404622ce45cdce3b03045df54;hp=9fcf7995745c5b6a1ec38788ab6c57269a493c28;hpb=570ad6257ed18fbbc840c17a600f12f2dc44b010;p=palacios.git diff --git a/palacios/include/palacios/vmm_list.h b/palacios/include/palacios/vmm_list.h index 9fcf799..9bcf7f8 100644 --- a/palacios/include/palacios/vmm_list.h +++ b/palacios/include/palacios/vmm_list.h @@ -1,11 +1,25 @@ +/* Stolen From Linux list implementation */ +/* Modifications by Jack Lange */ +/* (c) 2008, Jack Lange */ +/* (c) 2008, The V3VEE Project */ + #ifndef _VMM_LIST_H #define _VMM_LIST_H +// JRL FIXME +// #ifdef __V3VEE__ + #include #undef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + + static inline void prefetch(const void *x) {;} /* @@ -519,4 +533,7 @@ static inline void hlist_add_after(struct hlist_node *n, pos = n) +// JRL FIXME +//#endif // ! __V3VEE__ + #endif