3 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
6 This file is part of Cygwin.
8 This software is a copyrighted work licensed under the terms of the
9 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
22 bool read_ready, write_ready, except_ready;
23 bool read_selected, write_selected, except_selected;
25 int (*startup) (select_record *me, class select_stuff *stuff);
26 int (*peek) (select_record *, bool);
27 int (*verify) (select_record *me, fd_set *readfds, fd_set *writefds,
29 void (*cleanup) (select_record *me, class select_stuff *stuff);
30 struct select_record *next;
31 void set_select_errno () {__seterrno (); thread_errno = errno;}
32 int saw_error () {return thread_errno;}
34 select_record (int): fd (0), h (NULL), fh (NULL), thread_errno (0),
35 windows_handle (false), read_ready (false), write_ready (false),
36 except_ready (false), read_selected (false), write_selected (false),
37 except_selected (false), except_on_write (false),
38 startup (NULL), peek (NULL), verify (NULL), cleanup (NULL),
50 struct select_pipe_info: public select_info
54 struct select_socket_info: public select_info
61 struct select_serial_info: public select_info
65 struct select_mailslot_info: public select_info
73 bool always_ready, windows_used;
76 select_pipe_info *device_specific_pipe;
77 select_socket_info *device_specific_socket;
78 select_serial_info *device_specific_serial;
79 select_mailslot_info *device_specific_mailslot;
81 bool test_and_set (int i, fd_set *readfds, fd_set *writefds,
83 int poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds);
84 int wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms);
87 select_stuff (): always_ready (0), windows_used (0), start (0),
88 device_specific_pipe (0),
89 device_specific_socket (0),
90 device_specific_serial (0),
91 device_specific_mailslot (0) {}
93 #endif /* _SELECT_H_ */