+
+ xbt_os_thread_t main_thread = xbt_new0(s_xbt_os_thread_t, 1);
+ main_thread->name = (char *) "main";
+ main_thread->start_routine = NULL;
+ main_thread->param = NULL;
+
+ if (!TlsSetValue(xbt_self_thread_key, main_thread))
+ THROWF(system_error, (int)GetLastError(),
+ "Impossible to set the SimGrid identity descriptor to the main thread (TlsSetValue() failed)");
+