unicorn/qemu/include/qemu
Markus Armbruster eeef227560
range: Replace internal representation of Range
Range represents a range as follows. Member @start is the inclusive
lower bound, member @end is the exclusive upper bound. Zero @end is
special: if @start is also zero, the range is empty, else @end is to
be interpreted as 2^64. No other empty ranges may occur.

The range [0,2^64-1] cannot be represented. If you try to create it
with range_set_bounds1(), you get the empty range instead. If you try
to create it with range_set_bounds() or range_extend(), assertions
fail. Before range_set_bounds() existed, the open-coded creation
usually got you the empty range instead. Open deathtrap.

Moreover, the code dealing with the janus-faced @end is too clever by
half.

Dumb this down to a more pedestrian representation: members @lob and
@upb are inclusive lower and upper bounds. The empty range is encoded
as @lob = 1, @upb = 0.

Backports commit 6dd726a2bf1b800289d90a84d5fcb5ce7b78a8e1 from qemu
2018-02-25 00:44:36 -05:00
..
atomic.h atomics: do not emit consume barrier for atomic_rcu_read 2018-02-24 03:28:11 -05:00
bitmap.h memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
bitops.h bitops: Add MAKE_64BIT_MASK macro 2018-02-25 00:30:39 -05:00
bswap.h Move HOST_LONG_BITS from qemu-common.h to qemu/osdep.h 2018-02-21 23:10:43 -05:00
compiler.h compiler.h: add QEMU_ALIGNED() to enforce struct alignment 2018-02-24 17:32:43 -05:00
crc32c.h import 2015-08-21 15:04:50 +08:00
cutils.h util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
fprintf-fn.h Stop including qemu-common.h in memory.h 2018-02-17 15:23:16 -05:00
host-utils.h host-util: Add power calculation functions 2018-02-17 15:23:35 -05:00
int128.h Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
log.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
mmap-alloc.h exec: factor out duplicate mmap code 2018-02-17 15:24:03 -05:00
module.h cleanup qemu/include/qemu/module.h 2017-01-25 00:20:08 +08:00
osdep.h osdep: Move default qemu_hw_version() value to a macro 2018-02-24 03:16:34 -05:00
queue.h import 2015-08-21 15:04:50 +08:00
range.h range: Replace internal representation of Range 2018-02-25 00:44:36 -05:00
thread-posix.h remove mutex code 2017-01-20 15:44:03 +08:00
thread-win32.h remove mutex code 2017-01-20 15:44:03 +08:00
thread.h platform.h move #3 2017-01-21 00:13:21 +11:00
timer.h include: move CPU-related definitions out of qemu-common.h 2018-02-24 00:33:49 -05:00
typedefs.h include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00