qemu-e2k/docs
Paolo Bonzini 3a86a0fa76 qapi: untangle next_list
Right now, the semantics of next_list are complicated.  The caller must:

* call start_list

* call next_list for each element *including the first*

* on the first call to next_list, the second argument should point to
NULL and the result is the head of the list.  On subsequent calls,
the second argument should point to the last node (last result of
next_list) and next_list itself tacks the element at the tail of the
list.

This works for both input and output visitor, but having the visitor
write memory when it is only reading the list is ugly.  Plus, relying
on *list to detect the first call is tricky and undocumented.

We can initialize so->entry in next_list instead of start_list, leaving
it NULL in start_list.  This way next_list sees clearly whether it is
on the first call---as a bonus, it discriminates the cases based on
internal state of the visitor rather than external state.  We can
also pull the assignment of the list head from generated code up to
next_list.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-03-27 09:14:19 -03:00
..
specs qcow2: Allow >4 GB VM state 2011-12-15 12:40:33 +01:00
blkverify.txt blkverify: Add block driver for verifying I/O 2010-09-21 17:00:53 +02:00
bootindex.txt Add boot index documentation. 2011-02-01 16:50:44 -06:00
ccid.txt ccid: add docs 2011-04-01 19:07:49 -05:00
ich9-ehci-uhci.cfg usb: update documentation 2011-07-08 11:25:56 +02:00
libcacard.txt libcacard: Spelling and grammar fixes in documentation 2012-03-08 15:22:11 +00:00
live-block-ops.txt docs: describe live block operations 2012-01-26 14:49:18 +01:00
memory.txt memory: minor documentation fixes/enhancements 2011-12-06 10:10:21 +00:00
migration.txt docs: document memory API interaction with migration 2011-12-07 18:57:41 +02:00
qapi-code-gen.txt qapi: untangle next_list 2012-03-27 09:14:19 -03:00
qdev-device-use.txt docs: Fix qdev-device-use.txt typo in -chardev serial, path=COM<NUM> 2011-09-09 09:43:17 +01:00
tracing.txt docs: correct ./configure line in tracing.txt 2012-03-12 10:12:34 +00:00
usb2.txt usb: update documentation 2011-07-08 11:25:56 +02:00
writing-qmp-commands.txt Spelling fixes in comments and documentation 2012-01-13 10:36:59 +00:00
xen-save-devices-state.txt Introduce "xen-save-devices-state" 2012-03-19 18:21:00 +00:00