mmap-alloc: unfold qemu_ram_mmap()
commit94af9e34821c5c47a3c69fe242e32d0b33c2fff6
authorMurilo Opsfelder Araujo <muriloo@linux.ibm.com>
Wed, 30 Jan 2019 23:36:04 +0000 (30 21:36 -0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 5 Feb 2019 15:58:33 +0000 (5 10:58 -0500)
tree4e0200ccc4c551f78fca154740fd468720240bfe
parent009180bd49ad8851258acecfb109fc3aa2f480ad
mmap-alloc: unfold qemu_ram_mmap()

Unfold parts of qemu_ram_mmap() for the sake of understanding, moving
declarations to the top, and keeping architecture-specifics in the
ifdef-else blocks.  No changes in the function behaviour.

Give ptr and ptr1 meaningful names:
  ptr  -> guardptr : pointer to the PROT_NONE guard region
  ptr1 -> ptr      : pointer to the mapped memory returned to caller

Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
util/mmap-alloc.c