Cygwin: FIFO: update select
Add static functions peek_fifo, thread_fifo, start_thread_fifo, and fifo_cleanup to select.cc. These are based on the corresponding pipe functions, the main difference being that peek_fifo loops through the connected clients to see if any of them have data available for reading. Add the fhandler_fifo methods select_read, select_write, and select_except. Add accessor methods get_nclients, get_handle, and is_connected that are needed by peek_fifo.
This commit is contained in:
committed by
Corinna Vinschen
parent
1aa438a94c
commit
ee394c311e
@ -1278,6 +1278,10 @@ class fhandler_fifo: public fhandler_base
|
||||
public:
|
||||
fhandler_fifo ();
|
||||
bool hit_eof ();
|
||||
int get_nclients () const { return nclients; }
|
||||
HANDLE& get_handle () { return fhandler_base::get_handle (); }
|
||||
HANDLE get_handle (int i) const { return client[i].fh->get_handle (); }
|
||||
bool is_connected (int i) const { return client[i].state == fc_connected; }
|
||||
PUNICODE_STRING get_pipe_name ();
|
||||
DWORD listen_client_thread ();
|
||||
void fifo_client_lock () { _fifo_client_lock.lock (); }
|
||||
|
Reference in New Issue
Block a user