Imported Upstream version 4.2.1.60

Former-commit-id: 05052d1d7a3a94b0d9ee70461d62b6591e5ab5bc
This commit is contained in:
Xamarin Public Jenkins
2015-10-06 08:40:39 -04:00
committed by Jo Shields
parent ea5caba957
commit bdd40f83c0
55 changed files with 488 additions and 317 deletions

View File

@@ -733,7 +733,7 @@ int _wapi_setsockopt(guint32 fd, int level, int optname,
socklen_t type_len = sizeof (type);
if (!getsockopt (fd, level, SO_TYPE, &type, &type_len)) {
if (type == SOCK_DGRAM)
if (type == SOCK_DGRAM || type == SOCK_STREAM)
setsockopt (fd, level, SO_REUSEPORT, tmp_val, optlen);
}
}

View File

@@ -79,7 +79,7 @@
* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
#define MONO_CORLIB_VERSION 135
#define MONO_CORLIB_VERSION 138
typedef struct
{

View File

@@ -1 +1 @@
7d7b7588e7dae77ee43323197a1e31c9ad6c5adb
20306b572ddc8e866c948eb5b022acbe9c68f920

View File

@@ -152,6 +152,7 @@ ICALL(DECIMAL_13, "ToSingle", mono_decimal_to_float)
ICALL_TYPE(DELEGATE, "System.Delegate", DELEGATE_1)
ICALL(DELEGATE_1, "AllocDelegateLike_internal", ves_icall_System_Delegate_AllocDelegateLike_internal)
ICALL(DELEGATE_2, "CreateDelegate_internal", ves_icall_System_Delegate_CreateDelegate_internal)
ICALL(DELEGATE_3, "GetVirtualMethod_internal", ves_icall_System_Delegate_GetVirtualMethod_internal)
ICALL_TYPE(DEBUGR, "System.Diagnostics.Debugger", DEBUGR_1)
ICALL(DEBUGR_1, "IsAttached_internal", ves_icall_System_Diagnostics_Debugger_IsAttached_internal)

View File

@@ -1 +1 @@
675ead03dec528ee6fee4a68520415fdec68cf9f
6ebd10e41823c4ad8b8b55803384746f3d58e7ce

View File

@@ -778,6 +778,7 @@ struct _MonoDelegate {
MonoObject *target;
MonoMethod *method;
gpointer delegate_trampoline;
gpointer rgctx;
/*
* If non-NULL, this points to a memory location which stores the address of
* the compiled code of the method, or NULL if it is not yet compiled.
@@ -786,6 +787,7 @@ struct _MonoDelegate {
MonoReflectionMethod *method_info;
MonoReflectionMethod *original_method_info;
MonoObject *data;
MonoBoolean method_is_virtual;
};
typedef struct _MonoMulticastDelegate MonoMulticastDelegate;

View File

@@ -71,6 +71,7 @@ DECL_OFFSET(MonoDelegate, method_ptr)
DECL_OFFSET(MonoDelegate, invoke_impl)
DECL_OFFSET(MonoDelegate, method)
DECL_OFFSET(MonoDelegate, method_code)
DECL_OFFSET(MonoDelegate, method_is_virtual)
DECL_OFFSET(MonoInternalThread, tid)
DECL_OFFSET(MonoInternalThread, small_id)

View File

@@ -1,24 +1,5 @@
#if defined(HAVE_POLL)
#if defined(HAVE_POLL_H)
#include <poll.h>
#elif defined(HAVE_SYS_POLL_H)
#include <sys/poll.h>
#endif
typedef struct pollfd mono_pollfd;
#elif defined(HOST_WIN32)
#include "mswsock.h"
typedef WSAPOLLFD mono_pollfd;
#else
/* poll is not defined */
#error
#endif
#include "utils/mono-poll.h"
static mono_pollfd *poll_fds;
static guint poll_fds_capacity;
@@ -42,7 +23,7 @@ poll_init (gint wakeup_pipe_fd)
poll_fds = g_new0 (mono_pollfd, poll_fds_capacity);
POLL_INIT_FD (&poll_fds [0], wakeup_pipe_fd, POLLIN);
POLL_INIT_FD (&poll_fds [0], wakeup_pipe_fd, MONO_POLLIN);
return TRUE;
}
@@ -66,9 +47,9 @@ poll_register_fd (gint fd, gint events, gboolean is_new)
poll_event = 0;
if (events & EVENT_IN)
poll_event |= POLLIN;
poll_event |= MONO_POLLIN;
if (events & EVENT_OUT)
poll_event |= POLLOUT;
poll_event |= MONO_POLLOUT;
for (i = 0; i < poll_fds_size; ++i) {
if (poll_fds [i].fd == fd) {
@@ -128,6 +109,36 @@ poll_remove_fd (gint fd)
poll_fds_size -= 1;
}
static inline gint
poll_mark_bad_fds (mono_pollfd *poll_fds, gint poll_fds_size)
{
gint i, ready = 0;
for (i = 0; i < poll_fds_size; i++) {
if (poll_fds [i].fd == -1)
continue;
switch (mono_poll (&poll_fds [i], 1, 0)) {
case 1:
ready++;
break;
case -1:
#if !defined(HOST_WIN32)
if (errno == EBADF)
#else
if (WSAGetLastError () == WSAEBADF)
#endif
{
poll_fds [i].revents |= MONO_POLLNVAL;
ready++;
}
break;
}
}
return ready;
}
static gint
poll_event_wait (void (*callback) (gint fd, gint events, gpointer user_data), gpointer user_data)
{
@@ -138,13 +149,7 @@ poll_event_wait (void (*callback) (gint fd, gint events, gpointer user_data), gp
mono_gc_set_skip_thread (TRUE);
#if !defined(HOST_WIN32)
ready = poll (poll_fds, poll_fds_size, -1);
#else
ready = WSAPoll(poll_fds, poll_fds_size, -1);
if (ready == SOCKET_ERROR)
ready = -1;
#endif
ready = mono_poll (poll_fds, poll_fds_size, -1);
mono_gc_set_skip_thread (FALSE);
@@ -178,6 +183,15 @@ poll_event_wait (void (*callback) (gint fd, gint events, gpointer user_data), gp
ready = 0;
break;
}
#if !defined(HOST_WIN32)
case EBADF:
#else
case WSAEBADF:
#endif
{
ready = poll_mark_bad_fds (poll_fds, poll_fds_size);
break;
}
default:
#if !defined(HOST_WIN32)
g_error ("poll_event_wait: mono_poll () failed, error (%d) %s", errno, g_strerror (errno));
@@ -200,10 +214,12 @@ poll_event_wait (void (*callback) (gint fd, gint events, gpointer user_data), gp
continue;
fd = poll_fds [i].fd;
if (poll_fds [i].revents & (POLLIN | POLLERR | POLLHUP | POLLNVAL))
if (poll_fds [i].revents & (MONO_POLLIN | MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL))
events |= EVENT_IN;
if (poll_fds [i].revents & (POLLOUT | POLLERR | POLLHUP | POLLNVAL))
if (poll_fds [i].revents & (MONO_POLLOUT | MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL))
events |= EVENT_OUT;
if (poll_fds [i].revents & (MONO_POLLERR | MONO_POLLHUP | MONO_POLLNVAL))
events |= EVENT_ERR;
callback (fd, events, user_data);

View File

@@ -40,6 +40,7 @@ typedef struct {
enum {
EVENT_IN = 1 << 0,
EVENT_OUT = 1 << 1,
EVENT_ERR = 1 << 2,
} ThreadPoolIOEvent;
#include "threadpool-ms-io-epoll.c"
@@ -289,12 +290,13 @@ wait_callback (gint fd, gint events, gpointer user_data)
MonoGHashTable *states;
MonoMList *list = NULL;
gpointer k;
gboolean remove_fd = FALSE;
g_assert (user_data);
states = user_data;
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: cal fd %3d, events = %2s | %2s",
fd, (events & EVENT_IN) ? "RD" : "..", (events & EVENT_OUT) ? "WR" : "..");
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: cal fd %3d, events = %2s | %2s | %3s",
fd, (events & EVENT_IN) ? "RD" : "..", (events & EVENT_OUT) ? "WR" : "..", (events & EVENT_ERR) ? "ERR" : "...");
if (!mono_g_hash_table_lookup_extended (states, GINT_TO_POINTER (fd), &k, (gpointer*) &list))
g_error ("wait_callback: fd %d not found in states table", fd);
@@ -310,14 +312,23 @@ wait_callback (gint fd, gint events, gpointer user_data)
mono_threadpool_ms_enqueue_work_item (((MonoObject*) sockares)->vtable->domain, (MonoObject*) sockares);
}
mono_g_hash_table_replace (states, GINT_TO_POINTER (fd), list);
remove_fd = (events & EVENT_ERR) == EVENT_ERR;
if (!remove_fd) {
mono_g_hash_table_replace (states, GINT_TO_POINTER (fd), list);
events = get_events (list);
events = get_events (list);
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: res fd %3d, events = %2s | %2s",
fd, (events & EVENT_IN) ? "RD" : "..", (events & EVENT_OUT) ? "WR" : "..");
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: res fd %3d, events = %2s | %2s | %2s",
fd, (events & EVENT_IN) ? "RD" : "..", (events & EVENT_OUT) ? "WR" : "..", (events & EVENT_ERR) ? "ERR" : "...");
threadpool_io->backend.register_fd (fd, events, FALSE);
threadpool_io->backend.register_fd (fd, events, FALSE);
} else {
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: err fd %d", fd);
mono_g_hash_table_remove (states, GINT_TO_POINTER (fd));
threadpool_io->backend.remove_fd (fd);
}
}
}
@@ -367,8 +378,8 @@ selector_thread (gpointer data)
events = get_events (list);
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: %3s fd %3d, events = %2s | %2s",
exists ? "mod" : "add", fd, (events & EVENT_IN) ? "RD" : "..", (events & EVENT_OUT) ? "WR" : "..");
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: %3s fd %3d, events = %2s | %2s | %2s",
exists ? "mod" : "add", fd, (events & EVENT_IN) ? "RD" : "..", (events & EVENT_OUT) ? "WR" : "..", (events & EVENT_ERR) ? "ERR" : "...");
threadpool_io->backend.register_fd (fd, events, !exists);

View File

@@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.2.1.36/dbd6429\"" > version.h
echo "#define FULL_VERSION \"Stable 4.2.1.60/804ddbc\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.2.1.36/dbd6429\"" > version.h
echo "#define FULL_VERSION \"Stable 4.2.1.60/804ddbc\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -1 +1 @@
c65a3a960c9fab0078aaf2bc05b202ec039553a6
080f9cc654f5abb2d7030948dfd47427b8979777

View File

@@ -1 +1 @@
55b292ac8dd94a1c3eeb3d05962d2d9a30b1808f
0458c47551638425b42b9b304999eab0ae33938f

View File

@@ -1 +1 @@
8901046041bb65808a7d99cb9b185596c7be01c5
24b171b7d02edaa3d317cb6d27de214a3e476267

View File

@@ -1 +1 @@
8b14d1f670c108df89e59f0ab80f793a259597e1
b4605733bb4bb4fa16d13db526cb439680307bba

View File

@@ -1 +1 @@
1cbbf289bd0e3394b2850dfd3d558327f35ec6cc
7c01d8b67d92f0bebbdeff1c929e982a99b7d3bb

View File

@@ -1 +1 @@
#define FULL_VERSION "Stable 4.2.1.36/dbd6429"
#define FULL_VERSION "Stable 4.2.1.60/804ddbc"

View File

@@ -1 +1 @@
549a7cf0c9085eb4b819e7233c09a5a5fedb2835
dfcf6b34bb42b054c3aad0c16e51798401f02028

View File

@@ -25,6 +25,7 @@
load/unload/name for assemblies
removed TYPE_LOAD_ERR flag (profiler never generated it, now removed from the format itself)
added TYPE_GC_HANDLE_{CREATED,DESTROYED}_BT
TYPE_JIT events are no longer guaranteed to have code start/size info (can be zero)
*/
enum {

View File

@@ -181,6 +181,7 @@ BASE_TEST_CS_SRC= \
delegate9.cs \
delegate10.cs \
delegate11.cs \
delegate12.cs \
remoting1.cs \
remoting2.cs \
remoting3.cs \

Some files were not shown because too many files have changed in this diff Show More