qemu-patch-raspberry4/include
Peter Crosthwaite 5d24ee70bc error: Add error_abort
Add a special Error * that can be passed to error handling APIs to
signal that any errors are fatal and should abort QEMU. There are two
advantages to this:

- allows for brevity when wishing to assert success of Error **
  accepting APIs. No need for this pattern:
        Error * local_err = NULL;
        api_call(foo, bar, &local_err);
        assert_no_error(local_err);
  This also removes the need for _nofail variants of APIs with
  asserting call sites now reduced to 1LOC.
- SIGABRT happens from within the offending API. When a fatal error
  occurs in an API call (when the caller is asserting sucess) failure
  often means the API itself is broken. With the abort happening in the
  API call now, the stack frames into the call are available at debug
  time. In the assert_no_error scheme the abort happens after the fact.

The exact semantic is that when an error is raised, if the argument
Error ** matches &error_abort, then the abort occurs immediately. The
error messaged is reported.

For error_propagate, if the destination error is &error_abort, then
the abort happens at propagation time.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-01-06 14:01:53 -05:00
..
block block: add opt_transfer_length to BlockLimits 2013-12-05 11:45:24 +01:00
disas Add moxie disassembler 2013-03-23 14:25:41 +00:00
exec roms: Flush icache when writing roms to guest memory 2013-12-20 01:58:03 +01:00
fpu softfloat: Add minNum() and maxNum() functions to softfloat. 2013-12-10 13:28:50 +00:00
hw spapr-rtas: add ibm, (get|set)-system-parameter 2013-12-20 01:57:59 +01:00
migration vmstate: Add support for an array of ptimer_state * 2013-12-17 20:12:51 +00:00
monitor monitor: add object-add (QMP) and object_add (HMP) command 2014-01-06 13:45:47 -05:00
net net: disallow to specify multicast MAC address 2013-11-08 17:32:34 +01:00
qapi error: Add error_abort 2014-01-06 14:01:53 -05:00
qemu monitor: add object-add (QMP) and object_add (HMP) command 2014-01-06 13:45:47 -05:00
qom qom: Fix pointer to int property helpers' documentation 2013-11-05 18:06:51 +01:00
sysemu device_tree: qemu_fdt_setprop: Rename val_array arg 2013-12-20 01:58:12 +01:00
ui include: add missing config-host.h include 2013-12-16 10:12:20 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h tcg-s390: Use qemu_getauxval in query_facilities 2013-11-30 07:45:30 +13:00
glib-compat.h glib: add a compatibility interface for g_timeout_add_seconds 2013-03-25 13:10:40 -05:00
qemu-common.h qmp: add interface blockdev-snapshot-delete-internal-sync 2013-09-12 10:12:47 +02:00
qemu-io.h qemu-io: Interface cleanup 2013-06-06 11:27:05 +02:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00