+2009-09-30 Mark Probst <mark.probst@gmail.com>
+
+ * object-internals.h: Remove serialized culture fields from
+ MonoInternalThread.
+
+ * icall-def.h, thread-types.h, threads.c: Remove serialized
+ culture icalls.
+
+ * appdomain.c: Corlib version bump.
+
2009-09-30 Zoltan Varga <vargaz@gmail.com>
* marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
-#define MONO_CORLIB_VERSION 84
+#define MONO_CORLIB_VERSION 85
typedef struct
{
ICALL(THREAD_6, "GetCachedCurrentUICulture(System.Threading.InternalThread)", ves_icall_System_Threading_Thread_GetCachedCurrentUICulture)
ICALL(THREAD_7, "GetDomainID", ves_icall_System_Threading_Thread_GetDomainID)
ICALL(THREAD_8, "GetName_internal(System.Threading.InternalThread)", ves_icall_System_Threading_Thread_GetName_internal)
-ICALL(THREAD_9, "GetSerializedCurrentCulture(System.Threading.InternalThread)", ves_icall_System_Threading_Thread_GetSerializedCurrentCulture)
-ICALL(THREAD_10, "GetSerializedCurrentUICulture(System.Threading.InternalThread)", ves_icall_System_Threading_Thread_GetSerializedCurrentUICulture)
ICALL(THREAD_11, "GetState(System.Threading.InternalThread)", ves_icall_System_Threading_Thread_GetState)
ICALL(THREAD_53, "Interrupt_internal(System.Threading.InternalThread)", ves_icall_System_Threading_Thread_Interrupt_internal)
ICALL(THREAD_12, "Join_internal(System.Threading.InternalThread,int,intptr)", ves_icall_System_Threading_Thread_Join_internal)
ICALL(THREAD_16, "SetCachedCurrentCulture", ves_icall_System_Threading_Thread_SetCachedCurrentCulture)
ICALL(THREAD_17, "SetCachedCurrentUICulture", ves_icall_System_Threading_Thread_SetCachedCurrentUICulture)
ICALL(THREAD_18, "SetName_internal(System.Threading.InternalThread,string)", ves_icall_System_Threading_Thread_SetName_internal)
-ICALL(THREAD_19, "SetSerializedCurrentCulture(System.Threading.InternalThread,byte[])", ves_icall_System_Threading_Thread_SetSerializedCurrentCulture)
-ICALL(THREAD_20, "SetSerializedCurrentUICulture(System.Threading.InternalThread,byte[])", ves_icall_System_Threading_Thread_SetSerializedCurrentUICulture)
ICALL(THREAD_21, "SetState(System.Threading.InternalThread,System.Threading.ThreadState)", ves_icall_System_Threading_Thread_SetState)
ICALL(THREAD_22, "Sleep_internal", ves_icall_System_Threading_Thread_Sleep_internal)
ICALL(THREAD_54, "SpinWait_nop", ves_icall_System_Threading_Thread_SpinWait_nop)
gpointer suspended_event;
gpointer resume_event;
CRITICAL_SECTION *synch_cs;
- guint8* serialized_culture_info;
- guint32 serialized_culture_info_len;
- guint8* serialized_ui_culture_info;
- guint32 serialized_ui_culture_info_len;
MonoBoolean thread_dump_requested;
gpointer end_stack; /* This is only used when running in the debugger. */
MonoBoolean thread_interrupt_requested;
MonoString* ves_icall_System_Threading_Thread_GetName_internal (MonoInternalThread *this_obj) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_SetName_internal (MonoInternalThread *this_obj, MonoString *name) MONO_INTERNAL;
MonoObject* ves_icall_System_Threading_Thread_GetCachedCurrentCulture (MonoInternalThread *this_obj) MONO_INTERNAL;
-MonoArray* ves_icall_System_Threading_Thread_GetSerializedCurrentCulture (MonoInternalThread *this_obj) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_SetCachedCurrentCulture (MonoThread *this_obj, MonoObject *culture) MONO_INTERNAL;
-void ves_icall_System_Threading_Thread_SetSerializedCurrentCulture (MonoInternalThread *this_obj, MonoArray *arr) MONO_INTERNAL;
MonoObject* ves_icall_System_Threading_Thread_GetCachedCurrentUICulture (MonoInternalThread *this_obj) MONO_INTERNAL;
-MonoArray* ves_icall_System_Threading_Thread_GetSerializedCurrentUICulture (MonoInternalThread *this_obj) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_SetCachedCurrentUICulture (MonoThread *this_obj, MonoObject *culture) MONO_INTERNAL;
-void ves_icall_System_Threading_Thread_SetSerializedCurrentUICulture (MonoInternalThread *this_obj, MonoArray *arr) MONO_INTERNAL;
HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal(MonoBoolean owned, MonoString *name, MonoBoolean *created) MONO_INTERNAL;
MonoBoolean ves_icall_System_Threading_Mutex_ReleaseMutex_internal (HANDLE handle ) MONO_INTERNAL;
HANDLE ves_icall_System_Threading_Mutex_OpenMutex_internal (MonoString *name, gint32 rights, gint32 *error) MONO_INTERNAL;
if (thread == mono_thread_internal_current ())
mono_thread_pop_appdomain_ref ();
- if (thread->serialized_culture_info)
- g_free (thread->serialized_culture_info);
-
- if (thread->serialized_ui_culture_info)
- g_free (thread->serialized_ui_culture_info);
-
thread->cached_culture_info = NULL;
mono_gc_free_fixed (thread->static_data);
return lookup_cached_culture (this, mono_domain_get (), CULTURES_START_IDX);
}
-MonoArray*
-ves_icall_System_Threading_Thread_GetSerializedCurrentCulture (MonoInternalThread *this)
-{
- MonoArray *res;
-
- ensure_synch_cs_set (this);
-
- EnterCriticalSection (this->synch_cs);
-
- if (this->serialized_culture_info) {
- res = mono_array_new (mono_domain_get (), mono_defaults.byte_class, this->serialized_culture_info_len);
- memcpy (mono_array_addr (res, guint8, 0), this->serialized_culture_info, this->serialized_culture_info_len);
- } else {
- res = NULL;
- }
-
- LeaveCriticalSection (this->synch_cs);
-
- return res;
-}
-
static void
cache_culture (MonoInternalThread *this, MonoObject *culture, int start_idx)
{
cache_culture (this->internal_thread, culture, CULTURES_START_IDX);
}
-void
-ves_icall_System_Threading_Thread_SetSerializedCurrentCulture (MonoInternalThread *this, MonoArray *arr)
-{
- ensure_synch_cs_set (this);
-
- EnterCriticalSection (this->synch_cs);
-
- if (this->serialized_culture_info)
- g_free (this->serialized_culture_info);
- this->serialized_culture_info = g_new0 (guint8, mono_array_length (arr));
- this->serialized_culture_info_len = mono_array_length (arr);
- memcpy (this->serialized_culture_info, mono_array_addr (arr, guint8, 0), mono_array_length (arr));
-
- LeaveCriticalSection (this->synch_cs);
-}
-
-
MonoObject*
ves_icall_System_Threading_Thread_GetCachedCurrentUICulture (MonoInternalThread *this)
{
return lookup_cached_culture (this, mono_domain_get (), UICULTURES_START_IDX);
}
-MonoArray*
-ves_icall_System_Threading_Thread_GetSerializedCurrentUICulture (MonoInternalThread *this)
-{
- MonoArray *res;
-
- ensure_synch_cs_set (this);
-
- EnterCriticalSection (this->synch_cs);
-
- if (this->serialized_ui_culture_info) {
- res = mono_array_new (mono_domain_get (), mono_defaults.byte_class, this->serialized_ui_culture_info_len);
- memcpy (mono_array_addr (res, guint8, 0), this->serialized_ui_culture_info, this->serialized_ui_culture_info_len);
- } else {
- res = NULL;
- }
-
- LeaveCriticalSection (this->synch_cs);
-
- return res;
-}
-
void
ves_icall_System_Threading_Thread_SetCachedCurrentUICulture (MonoThread *this, MonoObject *culture)
{
cache_culture (this->internal_thread, culture, UICULTURES_START_IDX);
}
-void
-ves_icall_System_Threading_Thread_SetSerializedCurrentUICulture (MonoInternalThread *this, MonoArray *arr)
-{
- ensure_synch_cs_set (this);
-
- EnterCriticalSection (this->synch_cs);
-
- if (this->serialized_ui_culture_info)
- g_free (this->serialized_ui_culture_info);
- this->serialized_ui_culture_info = g_new0 (guint8, mono_array_length (arr));
- this->serialized_ui_culture_info_len = mono_array_length (arr);
- memcpy (this->serialized_ui_culture_info, mono_array_addr (arr, guint8, 0), mono_array_length (arr));
-
- LeaveCriticalSection (this->synch_cs);
-}
-
MonoThread *
mono_thread_current (void)
{