qemu-patch-raspberry4/scripts
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
..
kvm kvm: Add top-like kvm statistics script 2011-10-24 21:26:53 -02:00
analyse-9p-simpletrace.py scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations. 2011-12-21 12:37:23 +05:30
check-qerror.sh qerror: add check-qerror.sh to verify alphabetical order 2012-01-18 10:23:39 -02:00
checkpatch.pl Fix spelling in comments, documentation and messages 2011-12-14 11:09:44 +00:00
create_config Add scripts directory 2011-01-20 20:54:21 +00:00
feature_to_c.sh gdbstub-xml: avoid a warning from sparse 2011-01-23 11:43:25 +00:00
get_maintainer.pl get_maintainer: update to match qemu tree 2011-06-16 00:20:06 +03:00
hxtool vl.c: In qemu -h output, only print options for the arch we are running as 2011-12-19 10:27:33 -06:00
make_device_config.sh Add scripts directory 2011-01-20 20:54:21 +00:00
ordereddict.py qapi: add ordereddict.py helper library 2011-07-21 16:48:14 -03:00
qapi-commands.py qapi: add c_fun to escape function names 2012-03-26 13:21:46 -05:00
qapi-types.py qapi: add c_fun to escape function names 2012-03-26 13:21:46 -05:00
qapi-visit.py qapi: untangle next_list 2012-03-27 09:14:19 -03:00
qapi.py qapi: add c_fun to escape function names 2012-03-26 13:21:46 -05:00
qemu-binfmt-conf.sh s390x: s390x-linux-user support 2011-05-20 17:35:12 +02:00
qemu-gdb.py scripts: add gdb support script 2012-03-24 12:57:02 +00:00
refresh-pxe-roms.sh PXE: Refresh all PXE ROMs from the ipxe submodule 2011-04-18 11:46:41 -06:00
signrom.sh Add scripts directory 2011-01-20 20:54:21 +00:00
simpletrace.py simpletrace: fix process() argument count 2011-09-01 10:34:54 +01:00
texi2pod.pl Support utf8 chars in pod docs 2012-03-24 14:10:25 +00:00
tracetool tracetool: Omit useless QEMU_*_ENABLED() check 2012-03-12 10:12:34 +00:00
update-linux-headers.sh Add kernel header update script 2011-06-20 15:12:22 -03:00