2 * mono-tls.c: Low-level TLS support
4 * Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
9 static int tls_offsets [TLS_KEY_NUM];
10 static gboolean tls_offset_set [TLS_KEY_NUM];
13 * mono_tls_key_get_offset:
15 * Return the TLS offset used by the TLS var identified by KEY, previously initialized by a call to
16 * mono_tls_key_set_offset (). Return -1 if the offset is not known.
19 mono_tls_key_get_offset (MonoTlsKey key)
21 g_assert (tls_offset_set [key]);
22 return tls_offsets [key];
26 * mono_tls_key_set_offset:
28 * Set the TLS offset used by the TLS var identified by KEY.
31 mono_tls_key_set_offset (MonoTlsKey key, int offset)
33 tls_offsets [key] = offset;
34 tls_offset_set [key] = TRUE;