* 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.
This commit is contained in:
@@ -16,6 +16,8 @@ details. */
|
||||
#define _NOMNTENT_FUNCS
|
||||
#include <mntent.h>
|
||||
#undef _NOMNTENT_FUNCS
|
||||
#define USE_SYS_TYPES_FD_SET
|
||||
#include <winsock.h>
|
||||
|
||||
#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];
|
||||
|
||||
|
Reference in New Issue
Block a user