This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH 07/14] Cygwin: FIFO: code simplification: don't overload get_handle
- From: Ken Brown <kbrown at cornell dot edu>
- To: "cygwin-patches at cygwin dot com" <cygwin-patches at cygwin dot com>
- Date: Sun, 14 Apr 2019 19:16:00 +0000
- Subject: [PATCH 07/14] Cygwin: FIFO: code simplification: don't overload get_handle
- References: <20190414191543.3218-1-kbrown@cornell.edu>
Rename fhandler_fifo::get_handle(int) to get_fc_handle(int), and
remove fhandler_fifo::get_handle(void).
---
winsup/cygwin/fhandler.h | 7 ++++---
winsup/cygwin/select.cc | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 59d9dad16..1e26c651f 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1284,9 +1284,10 @@ public:
fhandler_fifo ();
bool hit_eof ();
int get_nhandlers () const { return nhandlers; }
- HANDLE& get_handle () { return fhandler_base::get_handle (); }
- HANDLE get_handle (int i) const { return fc_handler[i].fh->get_handle (); }
- bool is_connected (int i) const { return fc_handler[i].state == fc_connected; }
+ HANDLE get_fc_handle (int i) const
+ { return fc_handler[i].fh->get_handle (); }
+ bool is_connected (int i) const
+ { return fc_handler[i].state == fc_connected; }
PUNICODE_STRING get_pipe_name ();
DWORD listen_client_thread ();
void fifo_client_lock () { _fifo_client_lock.lock (); }
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index d257cc4ed..9cf892801 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -875,7 +875,7 @@ peek_fifo (select_record *s, bool from_select)
for (int i = 0; i < fh->get_nhandlers (); i++)
if (fh->is_connected (i))
{
- int n = pipe_data_available (s->fd, fh, fh->get_handle (i),
+ int n = pipe_data_available (s->fd, fh, fh->get_fc_handle (i),
false);
if (n > 0)
{
--
2.17.0