Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Duda <deo@logos-m.ru>2001-03-04 18:34:25 +0300
committerEgor Duda <deo@logos-m.ru>2001-03-04 18:34:25 +0300
commit306c4b6737136c7bb45228c284502eb643ec95ac (patch)
tree88b3eeaefe560eb41d42081a5648a15a40ec6eea /winsup/cygwin/tty.h
parent0312ede431278fb8a0aa6db9ae201d928d3b0055 (diff)
* fhandler.h (class fhandler_tty_common): New mutex and event to
syncronize input on master tty with slave tty. * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to syncronize with slave. * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and event to syncronize with master. Do not limit amount of data read from master to vmin value. Interrupt on signal and return already read data, if any. * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and event. * fhandler_tty.cc (fhandler_tty_common::close): Ditto. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto. * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto. * fhandler_tty.cc (fhandler_tty_common::dup): Ditto. * tty.h (tty::open_input_mutex): New function. * tty.cc (tty::common_init): Create input mutex and event.
Diffstat (limited to 'winsup/cygwin/tty.h')
-rw-r--r--winsup/cygwin/tty.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h
index bdd6eaedf..36f7ae19d 100644
--- a/winsup/cygwin/tty.h
+++ b/winsup/cygwin/tty.h
@@ -23,7 +23,9 @@ details. */
#define IOCTL_REQUEST_EVENT "cygtty%d.ioctl.request"
#define IOCTL_DONE_EVENT "cygtty%d.ioctl.done"
#define RESTART_OUTPUT_EVENT "cygtty%d.output.restart"
+#define INPUT_AVAILABLE_EVENT "cygtty%d.input.avail"
#define OUTPUT_MUTEX "cygtty%d.output.mutex"
+#define INPUT_MUTEX "cygtty%d.input.mutex"
#define TTY_SLAVE_ALIVE "cygtty%x.slave_alive"
#define TTY_MASTER_ALIVE "cygtty%x.master_alive"
@@ -111,6 +113,12 @@ public:
__small_sprintf (buf, OUTPUT_MUTEX, ntty);
return OpenMutex (MUTEX_ALL_ACCESS, inherit, buf);
}
+ HANDLE open_input_mutex (BOOL inherit = FALSE)
+ {
+ char buf[80];
+ __small_sprintf (buf, INPUT_MUTEX, ntty);
+ return OpenMutex (MUTEX_ALL_ACCESS, inherit, buf);
+ }
BOOL exists ()
{
HANDLE h = open_output_mutex ();