Implemented overloaded versions of Parse and TryParse functions for BigInteger.
[mono.git] / mono / utils / mono-tls.c
1 /*
2  * mono-tls.c: Low-level TLS support
3  *
4  * Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
5  */
6
7 #include "mono-tls.h"
8
9 static int tls_offsets [TLS_KEY_NUM];
10 static gboolean tls_offset_set [TLS_KEY_NUM];
11
12 /*
13  * mono_tls_key_get_offset:
14  *
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.
17  */
18 int
19 mono_tls_key_get_offset (MonoTlsKey key)
20 {
21         g_assert (tls_offset_set [key]);
22         return tls_offsets [key];
23 }
24
25 /*
26  * mono_tls_key_set_offset:
27  *
28  *   Set the TLS offset used by the TLS var identified by KEY.
29  */
30 void
31 mono_tls_key_set_offset (MonoTlsKey key, int offset)
32 {
33         tls_offsets [key] = offset;
34         tls_offset_set [key] = TRUE;
35 }