diff options
author | Christopher Faylor <me@cgf.cx> | 2012-12-22 23:35:41 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-12-22 23:35:41 +0400 |
commit | 4a84997ae4e5d770c14eb2bba73022ca3d9789e3 (patch) | |
tree | 861f91de6b26d4afc0512f87c56355bd5920e923 /winsup/cygwin/select.h | |
parent | e97256cf70fc1627641f0a10390b61ba904a6fe5 (diff) |
* select.h (select_stuff): Remove variable names from parameter declarations.
(select_info): Ditto.
(select_record::dump_select_record): Declare new debugging-only function.
(select_info): Zero all fields.
(select_pipe_info): Ditto.
(select_socket_info): Ditto.
(select_serial_info): Ditto.
(select_mailslot_info): Ditto.
* select.cc (select_record::dump_select_record): Define new debugging-only
function.
(select_stuff::test_and_set): Call dump_select_record when debugging.
* thread.cc (pthread_mutex::unlock): Revert setting of tid to NULL since, in
this context, it is a number, not a pointer.
(pthread_spinlock::unlock): Ditto.
Diffstat (limited to 'winsup/cygwin/select.h')
-rw-r--r-- | winsup/cygwin/select.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h index f9df95d93..5e746768c 100644 --- a/winsup/cygwin/select.h +++ b/winsup/cygwin/select.h @@ -22,11 +22,10 @@ struct select_record bool read_ready, write_ready, except_ready; bool read_selected, write_selected, except_selected; bool except_on_write; - int (*startup) (select_record *me, class select_stuff *stuff); + int (*startup) (select_record *, class select_stuff *); int (*peek) (select_record *, bool); - int (*verify) (select_record *me, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds); - void (*cleanup) (select_record *me, class select_stuff *stuff); + int (*verify) (select_record *, fd_set *, fd_set *, fd_set *); + void (*cleanup) (select_record *, class select_stuff *); struct select_record *next; void set_select_errno () {__seterrno (); thread_errno = errno;} int saw_error () {return thread_errno;} @@ -37,6 +36,9 @@ struct select_record except_selected (false), except_on_write (false), startup (NULL), peek (NULL), verify (NULL), cleanup (NULL), next (NULL) {} +#ifdef DEBUGGING + void dump_select_record (); +#endif }; struct select_info @@ -44,11 +46,12 @@ struct select_info cygthread *thread; bool stop_thread; select_record *start; - select_info () {} + select_info (): thread (NULL), stop_thread (0), start (NULL) {} }; struct select_pipe_info: public select_info { + select_pipe_info (): select_info () {} }; struct select_socket_info: public select_info @@ -56,14 +59,17 @@ struct select_socket_info: public select_info int num_w4; LONG *ser_num; HANDLE *w4; + select_socket_info (): select_info (), num_w4 (0), ser_num (0), w4 (NULL) {} }; struct select_serial_info: public select_info { + select_serial_info (): select_info () {} }; struct select_mailslot_info: public select_info { + select_mailslot_info (): select_info () {} }; class select_stuff @@ -88,10 +94,9 @@ public: select_serial_info *device_specific_serial; select_mailslot_info *device_specific_mailslot; - bool test_and_set (int i, fd_set *readfds, fd_set *writefds, - fd_set *exceptfds); - int poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds); - wait_states wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms); + bool test_and_set (int, fd_set *, fd_set *, fd_set *); + int poll (fd_set *, fd_set *, fd_set *); + wait_states wait (fd_set *, fd_set *, fd_set *, DWORD); void cleanup (); void destroy (); |