*/
private IntPtr unused1;
private IntPtr unused2;
+
+ /* This is used only to check that we are in sync between the representation
+ * of MonoInternalThread in native and InternalThread in managed
+ *
+ * DO NOT RENAME! DO NOT ADD FIELDS AFTER! */
+ private IntPtr last;
#endregion
#pragma warning restore 169, 414, 649
* of icalls, do not require an increment.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 154;
+ private const int mono_corlib_version = 155;
#pragma warning restore 169
[ComVisible (true)]
* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
-#define MONO_CORLIB_VERSION 154
+#define MONO_CORLIB_VERSION 155
typedef struct
{
*/
gsize unused1;
gsize unused2;
+
+ /* This is used only to check that we are in sync between the representation
+ * of MonoInternalThread in native and InternalThread in managed
+ *
+ * DO NOT RENAME! DO NOT ADD FIELDS AFTER! */
+ gpointer last;
};
struct _MonoThread {
DECL_OFFSET(MonoInternalThread, tid)
DECL_OFFSET(MonoInternalThread, small_id)
DECL_OFFSET(MonoInternalThread, static_data)
+DECL_OFFSET(MonoInternalThread, last)
DECL_OFFSET(MonoMulticastDelegate, delegates)
#include <mono/metadata/gc-internals.h>
#include <mono/metadata/reflection-internals.h>
+#include <mono/metadata/abi-details.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
res = create_thread (thread, internal, NULL, (MonoThreadStart) func, arg, threadpool_thread, stack_size, error);
return_val_if_nok (error, NULL);
- /* Check that the managed and unmanaged layout of MonoInternalThread matches */
-#ifndef MONO_CROSS_COMPILE
- if (mono_check_corlib_version () == NULL)
- g_assert (((char*)&internal->unused2 - (char*)internal) == mono_defaults.internal_thread_class->fields [mono_defaults.internal_thread_class->field.count - 1].offset);
-#endif
-
return internal;
}
* anything up.
*/
GetCurrentProcess ();
+
+ /* Check that the managed and unmanaged layout of MonoInternalThread matches */
+ g_assert (MONO_STRUCT_OFFSET (MonoInternalThread, last) == mono_field_get_offset (mono_class_get_field_from_name (mono_defaults.internal_thread_class, "last")));
}
void mono_thread_cleanup (void)