diff options
author | Christopher Faylor <me@cgf.cx> | 2010-07-30 18:04:22 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-07-30 18:04:22 +0000 |
commit | 4db1bd4040e1f12df5a4432ee228af9f5d2a084a (patch) | |
tree | 10e36b1da57d77e705b4fcbf0ff77bc7512150c9 /winsup/cygwin/fhandler_tty.cc | |
parent | 5a7e00a86655de00cf65577e5d2e357c54e4ed37 (diff) | |
download | cygnal-4db1bd4040e1f12df5a4432ee228af9f5d2a084a.tar.gz cygnal-4db1bd4040e1f12df5a4432ee228af9f5d2a084a.tar.bz2 cygnal-4db1bd4040e1f12df5a4432ee228af9f5d2a084a.zip |
* cygthread.h (LPVOID_THREAD_START_ROUTINE): Define.
(cygthread::create): Rename from cygthread::cygthread.
(cygthread::cygthread): Define new constructor which accepts
LPVOID_THREAD_START_ROUTINE as the first argument. Call cygthread::create.
* cygthread.cc (cygthread::create): Rename from cygthread::cygthread. Use
'arglen' rather than 'n' since 'n' is no longer supplied.
* fhandler_tty.cc (process_input): Define as void/noreturn.
(process_output): Ditto.
(process_ioctl): Ditto.
(fhandler_tty_master::init): Don't "zap_h" cygthreads which are noreturn. It's
now implied.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index cd931be54..1d44f3280 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -46,9 +46,9 @@ struct pipe_reply { fhandler_tty_master NO_COPY *tty_master; -static DWORD WINAPI process_input (void *); // Input queue thread -static DWORD WINAPI process_output (void *); // Output queue thread -static DWORD WINAPI process_ioctl (void *); // Ioctl requests thread +static void WINAPI process_input (void *) __attribute__((noreturn)); // Input queue thread +static void WINAPI process_output (void *) __attribute__((noreturn)); // Output queue thread +static void WINAPI process_ioctl (void *) __attribute__((noreturn)); // Ioctl requests thread fhandler_tty_master::fhandler_tty_master () : fhandler_pty_master (), console (NULL) @@ -89,18 +89,9 @@ fhandler_tty_master::init () set_close_on_exec (true); - cygthread *h; - h = new cygthread (process_input, 0, cygself, "ttyin"); - h->SetThreadPriority (THREAD_PRIORITY_HIGHEST); - h->zap_h (); - - h = new cygthread (process_ioctl, 0, cygself, "ttyioctl"); - h->SetThreadPriority (THREAD_PRIORITY_HIGHEST); - h->zap_h (); - - h = new cygthread (process_output, 0, cygself, "ttyout"); - h->SetThreadPriority (THREAD_PRIORITY_HIGHEST); - h->zap_h (); + new cygthread (process_input, 0, cygself, "ttyin"); + new cygthread (process_ioctl, 0, cygself, "ttyioctl"); + new cygthread (process_output, 0, cygself, "ttyout"); return 0; } @@ -225,7 +216,7 @@ fhandler_pty_master::accept_input () return ret; } -static DWORD WINAPI +static void WINAPI process_input (void *) { char rawbuf[INP_BUFFER_SIZE]; @@ -414,7 +405,7 @@ out: return rc; } -static DWORD WINAPI +static void WINAPI process_output (void *) { char buf[OUT_BUFFER_SIZE * 2]; @@ -436,7 +427,7 @@ process_output (void *) /* Process tty ioctl requests */ -static DWORD WINAPI +static void WINAPI process_ioctl (void *) { while (1) |