smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
+ synchro->io.surf_io = surf_host_read(host, fd->surf_file, size);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
+ synchro->io.surf_io = surf_host_write(host, fd->surf_file, size);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_open(host, fullpath);
+ synchro->io.surf_io = surf_host_open(host, fullpath);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
synchro->category = NULL;
synchro->io.host = host;
- synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
+ synchro->io.surf_io = surf_host_close(host, fd->surf_file);
surf_action_set_data(synchro->io.surf_io, synchro);
XBT_DEBUG("Create io synchro %p", synchro);
int SIMIX_file_unlink(smx_file_t fd, smx_host_t host)
{
/* check if the host is active */
- if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_name(host));
}
- int res = surf_workstation_unlink(host, fd->surf_file);
+ int res = surf_host_unlink(host, fd->surf_file);
xbt_free(fd);
return !!res;
}
sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd)
{
smx_host_t host = process->smx_host;
- return surf_workstation_get_size(host, fd->surf_file);
+ return surf_host_get_size(host, fd->surf_file);
}
sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd)
sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd)
{
smx_host_t host = process->smx_host;
- return surf_workstation_file_tell(host, fd->surf_file);
+ return surf_host_file_tell(host, fd->surf_file);
}
xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd)
{
smx_host_t host = process->smx_host;
- return surf_workstation_get_info(host, fd->surf_file);
+ return surf_host_get_info(host, fd->surf_file);
}
int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin)
int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin)
{
smx_host_t host = process->smx_host;
- return surf_workstation_file_seek(host, fd->surf_file, offset, origin);
+ return surf_host_file_seek(host, fd->surf_file, offset, origin);
}
int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath)
int SIMIX_file_move(smx_process_t process, smx_file_t file, const char* fullpath)
{
smx_host_t host = process->smx_host;
- return surf_workstation_file_move(host, file->surf_file, fullpath);
+ return surf_host_file_move(host, file->surf_file, fullpath);
}
sg_size_t SIMIX_storage_get_size(smx_storage_t storage){
(int)synchro->state);
}
- if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
+ if (surf_resource_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}