[utils] Don't abort at startup if remote TLS reads is not available.
[mono.git] / mono / utils / mach-support-amd64.c
index 47bced480236a5cdcaf66a7f0614104da64599e4..7944e2c986b68ceaa2dd2b86cb2fc5d3946f2d15 100644 (file)
@@ -107,6 +107,7 @@ mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
         */
        intptr_t *p = (intptr_t *)thread;
        intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
+       g_assert (tls_vector_offset != -1);
 
        return (void *) &tsd [key];
 }
@@ -151,7 +152,8 @@ mono_mach_init (pthread_key_t key)
                }
        }
 
-       g_error ("could not discover the mach TLS offset");
+       tls_vector_offset = -1;
+       g_warning ("could not discover the mach TLS offset");
 ok:
        pthread_setspecific (key, old_value);
 }