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:
authorChristopher Faylor <me@cgf.cx>2004-05-16 08:18:50 +0400
committerChristopher Faylor <me@cgf.cx>2004-05-16 08:18:50 +0400
commit0c565ab35b47c29c0d5ba7a6e28ca63535776ce8 (patch)
tree3c5c40d2bb4eb150ee58f043bbec30d1032c2a74 /winsup/cygwin/fhandler_socket.cc
parentaafd8a545f7d9089d47ac28d890840f22dac6df4 (diff)
* cygthread.cc (cygthread::is): Eliminate.
* cygthread.h (cygthread::is): Eliminate declaratin. * fhandler_console.cc (fhandler_console::read): Only wait for signal_arrived in the main thread. * fhandler_socket.cc: Include new "wininfo.h". (fhandler_socket::ioctl): Use 'winmsg' rather than 'gethwnd()'. * sync.cc (muto::grab): Define new function. (muto::acquire): Use tls pointer rather than tid. (muto::acquired): Ditto. (muto::reset): Delete. (muto::release): Ditto. Also implement "close on last release". * sync.h (muto::tid): Delete. (muto::tls): New field. (muto::ismine): Delete. (muto::owner): Delete. (muto::unstable): Delete. (muto::reset): Delete. (muto::upforgrabs): New method. (muto::grab): Ditto. (new_muto_name): New define. * wininfo.h: New file. (wininfo): New class. * window.cc: Rework throughout to use winfo class for controlling invisible window operation. (gethwnd): Delete definition. * winsup.h (gethwnd): Delete declaration.
Diffstat (limited to 'winsup/cygwin/fhandler_socket.cc')
-rw-r--r--winsup/cygwin/fhandler_socket.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index aee32ac1b..56b068cc5 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -32,6 +32,7 @@
#include "sigproc.h"
#include "cygthread.h"
#include "select.h"
+#include "wininfo.h"
#include <unistd.h>
extern bool fdsock (cygheap_fdmanip& fd, const device *, SOCKET soc);
@@ -1374,7 +1375,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
break;
}
case FIOASYNC:
- res = WSAAsyncSelect (get_socket (), gethwnd (), WM_ASYNCIO,
+ res = WSAAsyncSelect (get_socket (), winmsg, WM_ASYNCIO,
*(int *) p ? ASYNC_MASK : 0);
syscall_printf ("Async I/O on socket %s",
*(int *) p ? "started" : "cancelled");
@@ -1390,7 +1391,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
* blocking mode
*/
if (cmd == FIONBIO && *(int *) p == 0)
- WSAAsyncSelect (get_socket (), gethwnd (), 0, 0);
+ WSAAsyncSelect (get_socket (), winmsg, 0, 0);
res = ioctlsocket (get_socket (), cmd, (unsigned long *) p);
if (res == SOCKET_ERROR)
set_winsock_errno ();
@@ -1400,7 +1401,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
*(int *) p ? "non" : "");
/* Start AsyncSelect if async socket unblocked */
if (*(int *) p && async_io ())
- WSAAsyncSelect (get_socket (), gethwnd (), WM_ASYNCIO, ASYNC_MASK);
+ WSAAsyncSelect (get_socket (), winmsg, WM_ASYNCIO, ASYNC_MASK);
set_nonblocking (*(int *) p);
}