X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/603845ff04219895c5b7ba170940160bc8dfc619..11db66726a4b2a8709d53f5714eea975adbdd64f:/src/xbt/xbt_os_thread.c diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index 1a085c1b72..f7ed95eced 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -17,14 +17,14 @@ #include #endif -#include "internal_config.h" +#include "src/internal_config.h" #include "xbt/sysdep.h" #include "xbt/ex.h" -#include "xbt/ex_interface.h" /* We play crude games with exceptions */ -#include "portable.h" +#include "src/xbt/ex_interface.h" /* We play crude games with exceptions */ +#include "src/portable.h" #include "xbt/xbt_os_time.h" /* Portable time facilities */ #include "xbt/xbt_os_thread.h" /* This module */ -#include "xbt_modinter.h" /* Initialization/finalization of this module */ +#include "src/xbt_modinter.h" /* Initialization/finalization of this module */ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync_os, xbt, "Synchronization mechanism (OS-level)"); @@ -730,15 +730,13 @@ void xbt_os_thread_mod_preinit(void) { xbt_self_thread_key = TlsAlloc(); - main_thread = xbt_new(s_xbt_os_thread_t, 1); + 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; - main_thread->running_ctx = xbt_new(xbt_running_ctx_t, 1); - XBT_RUNNING_CTX_INITIALIZE(main_thread->running_ctx); if (!TlsSetValue(xbt_self_thread_key, main_thread)) - THROWF(system_error, errcode, + THROWF(system_error, (int)GetLastError(), "Impossible to set the SimGrid identity descriptor to the main thread (TlsSetValue() failed)"); }