X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5a5e8338f6d18da29438ec26f96970afb7579992..37d3feec77dbbee15fd81cac77b96e535db70292:/src/simix/simcalls_generated_body.c diff --git a/src/simix/simcalls_generated_body.c b/src/simix/simcalls_generated_body.c index 8b98b8e693..885dc4b46f 100644 --- a/src/simix/simcalls_generated_body.c +++ b/src/simix/simcalls_generated_body.c @@ -1642,13 +1642,12 @@ } return self->simcall.result.sgsz; } - inline static smx_file_t simcall_BODY_file_open(const char* mount, const char* path) { + inline static smx_file_t simcall_BODY_file_open(const char* fullpath) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_FILE_OPEN; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].cc = (const char*) mount; - self->simcall.args[1].cc = (const char*) path; + self->simcall.args[0].cc = (const char*) fullpath; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1766,14 +1765,13 @@ } return self->simcall.result.dp; } - inline static void simcall_BODY_storage_file_rename(smx_storage_t storage, const char* src, const char* dest) { + inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) { smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_STORAGE_FILE_RENAME; + self->simcall.call = SIMCALL_FILE_MOVE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) storage; - self->simcall.args[1].cc = (const char*) src; - self->simcall.args[2].cc = (const char*) dest; + self->simcall.args[0].dp = (void*) fd; + self->simcall.args[1].cc = (const char*) fullpath; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1781,7 +1779,24 @@ } else { SIMIX_simcall_pre(&self->simcall, 0); } - + return self->simcall.result.i; + } + inline static int simcall_BODY_file_rcopy(smx_file_t fd, smx_host_t host, const char* fullpath) { + smx_process_t self = SIMIX_process_self(); + self->simcall.call = SIMCALL_FILE_RCOPY; + memset(&self->simcall.result, 0, sizeof(self->simcall.result)); + memset(self->simcall.args, 0, sizeof(self->simcall.args)); + self->simcall.args[0].dp = (void*) fd; + self->simcall.args[1].dp = (void*) host; + self->simcall.args[2].cc = (const char*) fullpath; + if (self != simix_global->maestro_process) { + XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, + SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); + SIMIX_process_yield(self); + } else { + SIMIX_simcall_pre(&self->simcall, 0); + } + return self->simcall.result.i; } inline static sg_size_t simcall_BODY_storage_get_free_size(const char* name) { smx_process_t self = SIMIX_process_self();