]> git.proxmox.com Git - mirror_qemu.git/commit
mmap-alloc: unfold qemu_ram_mmap()
authorMurilo Opsfelder Araujo <muriloo@linux.ibm.com>
Wed, 30 Jan 2019 23:36:04 +0000 (21:36 -0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 4 Feb 2019 07:44:20 +0000 (18:44 +1100)
commit2044c3e7116eeac0449dcb4a4130cc8f8b9310da
tree05b5e5a1d5450729bfc8d54c231a7c4ebe27397a
parenteac57b405afabcdf6aea82ef5f4cf44cd45c04cb
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: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
util/mmap-alloc.c