Cygwin: [gs]et_io_handle(): renamed to [gs]et_handle().

- Unify get_io_handle() and get_handle() to get_handle().
  Both of them returned same value; io_handle.
- Rename set_io_handle() to set_handle().
This commit is contained in:
Takashi Yano
2019-03-30 16:12:02 +09:00
committed by Corinna Vinschen
parent 023c107a22
commit a9c661a94d
14 changed files with 87 additions and 86 deletions

View File

@@ -266,7 +266,7 @@ fhandler_fifo::open_pipe ()
sharing = FILE_SHARE_READ | FILE_SHARE_WRITE;
status = NtOpenFile (&ph, access, &attr, &io, sharing, 0);
if (NT_SUCCESS (status))
set_io_handle (ph);
set_handle (ph);
return status;
}
@@ -293,7 +293,7 @@ fhandler_fifo::add_client ()
HANDLE ph = create_pipe_instance (first);
if (!ph)
goto errout;
fh->set_io_handle (ph);
fh->set_handle (ph);
fh->set_flags (get_flags ());
if (fc.connect () < 0)
{
@@ -486,7 +486,7 @@ fhandler_fifo::open (int flags, mode_t)
res = error_errno_set;
goto out;
}
set_io_handle (ph);
set_handle (ph);
set_pipe_non_blocking (ph, true);
if (!(fh = build_fh_dev (dev ())))
{
@@ -494,7 +494,7 @@ fhandler_fifo::open (int flags, mode_t)
res = error_errno_set;
goto out;
}
fh->set_io_handle (ph);
fh->set_handle (ph);
fh->set_flags (flags);
if (!(connect_evt = create_event ()))
{
@@ -604,8 +604,8 @@ out:
CloseHandle (write_ready);
write_ready = NULL;
}
if (get_io_handle ())
CloseHandle (get_io_handle ());
if (get_handle ())
CloseHandle (get_handle ());
if (listen_client_thr)
CloseHandle (listen_client_thr);
}