Revert "[w32handle] Remove use of w32handle for File, Console, Pipe and Socket (...
[mono.git] / mono / metadata / w32socket-win32.c
index 4d71777f06d350bef9a6f218d92cf3574441c129..a3f8d410583248e150c7a930fa068255ad35624f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32socket-win32.c: Windows specific socket code.
+/**
+ * \file
+ * Windows specific socket code.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -136,9 +137,7 @@ SOCKET mono_w32socket_accept (SOCKET s, struct sockaddr *addr, socklen_t *addrle
 {
        MonoInternalThread *curthread = mono_thread_internal_current ();
        SOCKET newsock = INVALID_SOCKET;
-       curthread->interrupt_on_stop = (gpointer)TRUE;
        ALERTABLE_SOCKET_CALL (FD_ACCEPT_BIT, blocking, TRUE, newsock, accept, s, addr, addrlen);
-       curthread->interrupt_on_stop = (gpointer)FALSE;
        return newsock;
 }
 
@@ -154,9 +153,7 @@ int mono_w32socket_recv (SOCKET s, char *buf, int len, int flags, gboolean block
 {
        MonoInternalThread *curthread = mono_thread_internal_current ();
        int ret = SOCKET_ERROR;
-       curthread->interrupt_on_stop = (gpointer)TRUE;
        ALERTABLE_SOCKET_CALL (FD_READ_BIT, blocking, TRUE, ret, recv, s, buf, len, flags);
-       curthread->interrupt_on_stop = (gpointer)FALSE;
        return ret;
 }
 
@@ -313,7 +310,8 @@ mono_w32socket_convert_error (gint error)
 }
 
 gboolean
-ves_icall_System_Net_Sockets_Socket_SupportPortReuse (MonoProtocolType proto)
+ves_icall_System_Net_Sockets_Socket_SupportPortReuse (MonoProtocolType proto, MonoError *error)
 {
+       error_init (error);
        return TRUE;
 }