コード例 #1
0
ファイル: msg_io.c プロジェクト: FlorianPO/simgrid
/** \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;
}
コード例 #2
0
ファイル: s4u_file.cpp プロジェクト: apargupta/simgrid
File::~File() {
	simcall_file_close(p_inferior, Host::current()->inferior());
}
コード例 #3
0
ファイル: s4u_file.cpp プロジェクト: R7R8/simgrid
File::~File() {
  simcall_file_close(inferior_, Host::current());
}