/* xbt_os_thread -- portability layer over the pthread API */
/* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD */
/* xbt_os_thread -- portability layer over the pthread API */
/* Used in RL to get win/lin portability, and in SG when CONTEXT_THREAD */
#include "xbt/xbt_os_time.h" /* Portable time facilities */
#include "xbt/xbt_os_thread.h" /* This module */
#include "xbt/xbt_os_time.h" /* Portable time facilities */
#include "xbt/xbt_os_thread.h" /* This module */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync_os, xbt,
"Synchronization mechanism (OS-level)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync_os, xbt,
"Synchronization mechanism (OS-level)");
"pthread_key_create failed for xbt_self_thread_key");
main_thread = xbt_new(s_xbt_os_thread_t, 1);
"pthread_key_create failed for xbt_self_thread_key");
main_thread = xbt_new(s_xbt_os_thread_t, 1);
XBT_RUNNING_CTX_INITIALIZE(main_thread->running_ctx);
if ((errcode = pthread_setspecific(xbt_self_thread_key, main_thread)))
XBT_RUNNING_CTX_INITIALIZE(main_thread->running_ctx);
if ((errcode = pthread_setspecific(xbt_self_thread_key, main_thread)))
main_thread->name = (char *) "main";
main_thread->start_routine = NULL;
main_thread->param = NULL;
main_thread->name = (char *) "main";
main_thread->start_routine = NULL;
main_thread->param = NULL;