diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2020-03-23 21:06:00 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-03-23 21:06:03 +0100 |
commit | 2a4b1de773e6159ea8197b6fc3f7e4845479b476 (patch) | |
tree | 48a1f66580b0288c07f907400ce91abfd1082135 /winsup/cygwin/fhandler.h | |
parent | a1f0585454ea60f9e10be1f0cdcc7c0c1ceb2d0e (diff) | |
download | newlib-2a4b1de773e6159ea8197b6fc3f7e4845479b476.zip newlib-2a4b1de773e6159ea8197b6fc3f7e4845479b476.tar.gz newlib-2a4b1de773e6159ea8197b6fc3f7e4845479b476.tar.bz2 |
Cygwin: serial: use per call OVERLAPPED structs
Sharing the OVERLAPPED struct and event object in there between
read and select calls in the fhandler might have been a nice
optimization way back when, but it is a dangerous, not thread-safe
approach. Fix this by creating per-fhandler, per-call OVERLAPPED
structs and event objects on demand.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 45e256e..1c73363 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1685,19 +1685,13 @@ class fhandler_serial: public fhandler_base pid_t pgrp_; int rts; /* for Windows 9x purposes only */ int dtr; /* for Windows 9x purposes only */ - DWORD event; /* for select */ public: - OVERLAPPED io_status; - /* Constructor */ fhandler_serial (); int open (int flags, mode_t mode); - int close (); int init (HANDLE h, DWORD a, mode_t flags); - void overlapped_setup (); - int dup (fhandler_base *child, int); void __reg3 raw_read (void *ptr, size_t& ulen); ssize_t __reg3 raw_write (const void *ptr, size_t ulen); int tcsendbreak (int); @@ -1714,8 +1708,6 @@ class fhandler_serial: public fhandler_base } int tcflush (int); bool is_tty () const { return true; } - void fixup_after_fork (HANDLE parent); - void fixup_after_exec (); /* We maintain a pgrp so that tcsetpgrp and tcgetpgrp work, but we don't use it for permissions checking. fhandler_pty_slave does |