Esempio n. 1
0
/** \ingroup msg_file_management
 * \brief Close the file
 *
 * \param fd is the file to close
 * \return 0 on success or 1 on error
 */
int MSG_file_close(msg_file_t fd)
{
  char *name;
  msg_file_priv_t priv = MSG_file_priv(fd);
  if (priv->data)
    xbt_free(priv->data);

  int res = simcall_file_close(priv->simdata->smx_file, MSG_host_self());
  name = bprintf("%s:%i:%s",MSG_host_get_name(MSG_host_self()),MSG_process_self_PID(),priv->fullpath);
  xbt_lib_unset(file_lib, name, MSG_FILE_LEVEL, 1);
  xbt_free(name);
  return res;
}
Esempio n. 2
0
File::~File() {
	simcall_file_close(p_inferior, Host::current()->inferior());
}
Esempio n. 3
0
File::~File() {
  simcall_file_close(inferior_, Host::current());
}