[threads] Remove dead code
authorLudovic Henry <ludovic.henry@xamarin.com>
Wed, 20 May 2015 13:55:55 +0000 (10:55 -0300)
committerLudovic Henry <ludovic.henry@xamarin.com>
Wed, 20 May 2015 13:56:53 +0000 (10:56 -0300)
mono/metadata/threads.c

index 737380fe0148a499eeef7353ffcdf862276cb75a..ecad4842b149027b8e2d3f780d001b952b3a8dd4 100644 (file)
@@ -3987,67 +3987,6 @@ mono_special_static_data_free_slot (guint32 offset, guint32 size)
        mono_threads_unlock ();
 }
 
-typedef struct {
-       /* local tls data to get locals_slot from a thread */
-       guint32 offset;
-       /* index in the locals_slot array */
-       int slot;
-} LocalSlotID;
-
-/*
- * LOCKING: requires that threads_mutex is held
- */
-static void
-clear_thread_local_slot (gpointer key, gpointer value, gpointer user_data)
-{
-       MonoInternalThread *thread = (MonoInternalThread *) value;
-       LocalSlotID *sid = user_data;
-
-       int idx = ACCESS_SPECIAL_STATIC_OFFSET (sid->offset, index);
-       int off = ACCESS_SPECIAL_STATIC_OFFSET (sid->offset, offset);
-
-       if (!thread->static_data || !thread->static_data [idx])
-               return;
-
-       MonoArray *slots_array = *(MonoArray **)(((char *) thread->static_data [idx]) + off);
-
-       if (!slots_array || sid->slot >= mono_array_length (slots_array))
-               return;
-
-       mono_array_set (slots_array, MonoObject *, sid->slot, NULL);
-}
-
-/*
- * LOCKING: requires that threads_mutex is held
- */
-static void
-clear_context_local_slot (gpointer key, gpointer value, gpointer user_data)
-{
-       uint32_t gch = GPOINTER_TO_UINT (key);
-       MonoAppContext *ctx = (MonoAppContext *) mono_gchandle_get_target (gch);
-
-       if (!ctx) {
-               g_hash_table_remove (contexts, key);
-               mono_gchandle_free (gch);
-               return;
-       }
-
-       LocalSlotID *sid = user_data;
-
-       int idx = ACCESS_SPECIAL_STATIC_OFFSET (sid->offset, index);
-       int off = ACCESS_SPECIAL_STATIC_OFFSET (sid->offset, offset);
-
-       if (!ctx->static_data || !ctx->static_data [idx])
-               return;
-
-       MonoArray *slots_array = *(MonoArray **) (((char *) ctx->static_data [idx]) + off);
-
-       if (!slots_array || sid->slot >= mono_array_length (slots_array))
-               return;
-
-       mono_array_set (slots_array, MonoObject *, sid->slot, NULL);
-}
-
 #ifdef HOST_WIN32
 static void CALLBACK dummy_apc (ULONG_PTR param)
 {