Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/interface/hvm/save.h
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
# define DECLARE_HVM_SAVE_TYPE_COMPAT(_x, _code, _type, _ctype, _fix) \ | # define DECLARE_HVM_SAVE_TYPE_COMPAT(_x, _code, _type, _ctype, _fix) \ | ||||
struct __HVM_SAVE_TYPE_##_x { _type t; char c[_code]; char cpt[2];} | struct __HVM_SAVE_TYPE_##_x { _type t; char c[_code]; char cpt[2];} | ||||
# define DECLARE_HVM_SAVE_TYPE(_x, _code, _type) \ | # define DECLARE_HVM_SAVE_TYPE(_x, _code, _type) \ | ||||
struct __HVM_SAVE_TYPE_##_x { _type t; char c[_code]; char cpt[1];} | struct __HVM_SAVE_TYPE_##_x { _type t; char c[_code]; char cpt[1];} | ||||
#endif | #endif | ||||
#define HVM_SAVE_TYPE(_x) typeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->t) | #define HVM_SAVE_TYPE(_x) __typeof__ (((struct __HVM_SAVE_TYPE_##_x *)(0))->t) | ||||
#define HVM_SAVE_LENGTH(_x) (sizeof (HVM_SAVE_TYPE(_x))) | #define HVM_SAVE_LENGTH(_x) (sizeof (HVM_SAVE_TYPE(_x))) | ||||
#define HVM_SAVE_CODE(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->c)) | #define HVM_SAVE_CODE(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->c)) | ||||
#ifdef __XEN__ | #ifdef __XEN__ | ||||
# define HVM_SAVE_TYPE_COMPAT(_x) typeof (((struct __HVM_SAVE_TYPE_COMPAT_##_x *)(0))->t) | # define HVM_SAVE_TYPE_COMPAT(_x) __typeof__ (((struct __HVM_SAVE_TYPE_COMPAT_##_x *)(0))->t) | ||||
# define HVM_SAVE_LENGTH_COMPAT(_x) (sizeof (HVM_SAVE_TYPE_COMPAT(_x))) | # define HVM_SAVE_LENGTH_COMPAT(_x) (sizeof (HVM_SAVE_TYPE_COMPAT(_x))) | ||||
# define HVM_SAVE_HAS_COMPAT(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->cpt)-1) | # define HVM_SAVE_HAS_COMPAT(_x) (sizeof (((struct __HVM_SAVE_TYPE_##_x *)(0))->cpt)-1) | ||||
# define HVM_SAVE_FIX_COMPAT(_x, _dst, _size) __HVM_SAVE_FIX_COMPAT_##_x(_dst, _size) | # define HVM_SAVE_FIX_COMPAT(_x, _dst, _size) __HVM_SAVE_FIX_COMPAT_##_x(_dst, _size) | ||||
#endif | #endif | ||||
/* | /* | ||||
* The series of save records is teminated by a zero-type, zero-length | * The series of save records is teminated by a zero-type, zero-length | ||||
Show All 15 Lines |