From 5a2d822de903a90b37b8ee48657fc2f56b34d0e1 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 20 Feb 2020 13:31:04 +0100 Subject: [PATCH] add sg_disk_get_host() --- include/simgrid/disk.h | 1 + src/s4u/s4u_Disk.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/simgrid/disk.h b/include/simgrid/disk.h index 98e073e11e..9ff8b337b1 100644 --- a/include/simgrid/disk.h +++ b/include/simgrid/disk.h @@ -12,6 +12,7 @@ /* C interface */ SG_BEGIN_DECL XBT_PUBLIC const char* sg_disk_name(const_sg_disk_t disk); +XBT_PUBLIC sg_host_t sg_disk_get_host(const_sg_disk_t disk); XBT_PUBLIC double sg_disk_read_bandwidth(const_sg_disk_t disk); XBT_PUBLIC double sg_disk_write_bandwidth(const_sg_disk_t disk); XBT_PUBLIC sg_size_t sg_disk_write(sg_disk_t disk, sg_size_t size); diff --git a/src/s4u/s4u_Disk.cpp b/src/s4u/s4u_Disk.cpp index f558aa8d1e..d75db46246 100644 --- a/src/s4u/s4u_Disk.cpp +++ b/src/s4u/s4u_Disk.cpp @@ -84,6 +84,11 @@ const char* sg_disk_name(const_sg_disk_t disk) return disk->get_cname(); } +sg_host_t sg_disk_get_host(const_sg_disk_t disk) +{ + return disk->get_host(); +} + double sg_disk_read_bandwidth(const_sg_disk_t disk) { return disk->get_read_bandwidth(); -- 2.20.1