From 1cda132258b09d009064856dab1c36f3b9f19628 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 11 Oct 2004 02:21:31 +0000 Subject: * cygtls.h (exitsock): New element. (exitsock_sin): Ditto. * cygtls.cc (_cygtls::init_thread): Initialize exitsock to invalid handle. (_cygtls::call2): Close exitsock if it is valid. * select.cc (struct socketinf): Remove sin element. (start_thread_socket): Initialize one SOCK_DGRAM socket per thread instead of (apparently) expensive opening and closing of socket with each select call. (socket_cleanup): Send a byte to the exitsock socket as a way to potentially signal a waiting-for-socket thread to exit. * tlsoffsets.h: Regenerate. --- winsup/cygwin/cygtls.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'winsup/cygwin/cygtls.h') diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index 2ce91dbc8..016bf8c9c 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -16,6 +16,8 @@ details. */ #define _NOMNTENT_FUNCS #include #undef _NOMNTENT_FUNCS +#define USE_SYS_TYPES_FD_SET +#include #define CYGTLS_INITIALIZED 0x43227 #define CYGTLS_EXCEPTION (0x43227 + true) @@ -61,6 +63,10 @@ struct _local_storage char mnt_fsname[CYG_MAX_PATH]; char mnt_dir[CYG_MAX_PATH]; + /* select.cc */ + SOCKET exitsock; + struct sockaddr_in exitsock_sin; + /* strerror */ char strerror_buf[20]; -- cgit v1.2.3