[threads] Store MonoInternalThread in MonoThreadInfo for use when detaching (#5058)
[mono.git] / mono / unit-tests / test-mono-linked-list-set.c
index 7d5cac53085e4ff5f6148fb3a3095a0a5c4f81cd..202d2fc07a11a46caf2006184fb44e72a7d68f84 100644 (file)
@@ -48,7 +48,7 @@ mono_hazard_pointer_clear_all (MonoThreadHazardPointers *hp, int retain)
 static void
 free_node (void *n)
 {
-       node_t *node = n;
+       node_t *node = (node_t *)n;
        assert (node->state == STATE_BUSY);
        node->state = STATE_OUT;
 }
@@ -56,7 +56,7 @@ free_node (void *n)
 static void*
 worker (void *arg)
 {
-       thread_data_t *thread_data = arg;
+       thread_data_t *thread_data = (thread_data_t *)arg;
        MonoThreadHazardPointers *hp;
        int skip = thread_data->skip;
        int i, j;
@@ -116,15 +116,12 @@ int
 main (int argc, char *argv [])
 {
        int primes [] = { 1, 2, 3, 5, 7, 11, 13, 17 };
-       MonoThreadInfoCallbacks thread_callbacks;
        thread_data_t thread_data [NUM_THREADS];
        int i;
 
-       memset (&thread_callbacks, 0, sizeof (thread_callbacks));
-
        mono_metadata_init ();
 
-       mono_threads_init (&thread_callbacks, 0);
+       mono_thread_info_init (0);
 
        mono_lls_init (&lls, free_node);