Revision d4829d49 hw/hw.h
b/hw/hw.h | ||
---|---|---|
355 | 355 |
vmstate_offset_array(_state, _field, uint8_t, \ |
356 | 356 |
sizeof(typeof_field(_state, _field))) |
357 | 357 |
|
358 |
#define VMSTATE_SINGLE(_field, _state, _version, _info, _type) { \ |
|
359 |
.name = (stringify(_field)), \ |
|
360 |
.version_id = (_version), \ |
|
361 |
.size = sizeof(_type), \ |
|
362 |
.info = &(_info), \ |
|
363 |
.flags = VMS_SINGLE, \ |
|
364 |
.offset = vmstate_offset_value(_state, _field, _type), \ |
|
365 |
} |
|
366 |
|
|
367 |
#define VMSTATE_SINGLE_TEST(_field, _state, _test, _info, _type) { \ |
|
358 |
#define VMSTATE_SINGLE_TEST(_field, _state, _test, _version, _info, _type) { \ |
|
368 | 359 |
.name = (stringify(_field)), \ |
360 |
.version_id = (_version), \ |
|
369 | 361 |
.field_exists = (_test), \ |
370 | 362 |
.size = sizeof(_type), \ |
371 | 363 |
.info = &(_info), \ |
... | ... | |
506 | 498 |
_v : version |
507 | 499 |
*/ |
508 | 500 |
|
501 |
#define VMSTATE_SINGLE(_field, _state, _version, _info, _type) \ |
|
502 |
VMSTATE_SINGLE_TEST(_field, _state, NULL, _version, _info, _type) |
|
503 |
|
|
509 | 504 |
#define VMSTATE_INT8_V(_f, _s, _v) \ |
510 | 505 |
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_int8, int8_t) |
511 | 506 |
#define VMSTATE_INT16_V(_f, _s, _v) \ |
... | ... | |
558 | 553 |
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t) |
559 | 554 |
|
560 | 555 |
#define VMSTATE_UINT32_TEST(_f, _s, _t) \ |
561 |
VMSTATE_SINGLE_TEST(_f, _s, _t, vmstate_info_uint32, uint32_t) |
|
556 |
VMSTATE_SINGLE_TEST(_f, _s, _t, 0, vmstate_info_uint32, uint32_t)
|
|
562 | 557 |
|
563 | 558 |
#define VMSTATE_TIMER_V(_f, _s, _v) \ |
564 | 559 |
VMSTATE_POINTER(_f, _s, _v, vmstate_info_timer, QEMUTimer *) |
Also available in: Unified diff