diff options
author | Fam Zheng <famz@redhat.com> | 2016-03-01 14:18:18 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-07 13:18:28 +0100 |
commit | 528f46af6ecd1e300db18684969104d4067b867b (patch) | |
tree | 8b2d1ff05b51f7246084ea848ed1d420a285d0b7 /include | |
parent | bb8f32c0318cb6c6e13e09ec0f35e21eff246413 (diff) | |
download | qemu-528f46af6ecd1e300db18684969104d4067b867b.zip qemu-528f46af6ecd1e300db18684969104d4067b867b.tar.gz qemu-528f46af6ecd1e300db18684969104d4067b867b.tar.bz2 |
exec: Return RAMBlock pointer from allocating functions
Previously we return RAMBlock.offset; now return the pointer to the
whole structure.
ram_block_add returns void now, error is completely passed with errp.
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1456813104-25902-2-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/ram_addr.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 5d33def..865e19b 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -94,17 +94,17 @@ ram_addr_t last_ram_offset(void); void qemu_mutex_lock_ramlist(void); void qemu_mutex_unlock_ramlist(void); -ram_addr_t qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr, - bool share, const char *mem_path, - Error **errp); -ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, - MemoryRegion *mr, Error **errp); -ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp); -ram_addr_t qemu_ram_alloc_resizeable(ram_addr_t size, ram_addr_t max_size, - void (*resized)(const char*, - uint64_t length, - void *host), - MemoryRegion *mr, Error **errp); +RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr, + bool share, const char *mem_path, + Error **errp); +RAMBlock *qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, + MemoryRegion *mr, Error **errp); +RAMBlock *qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp); +RAMBlock *qemu_ram_alloc_resizeable(ram_addr_t size, ram_addr_t max_size, + void (*resized)(const char*, + uint64_t length, + void *host), + MemoryRegion *mr, Error **errp); int qemu_get_ram_fd(ram_addr_t addr); void qemu_set_ram_fd(ram_addr_t addr, int fd); void *qemu_get_ram_block_host_ptr(ram_addr_t addr); |