/* xbt_synchro -- Synchronization virtualized depending on whether we are */
/* in simulation or real life (act on simulated processes) */
/* This is the real life implementation, using xbt_os_thread to be portable */
/* to windows and linux. */
/* xbt_synchro -- Synchronization virtualized depending on whether we are */
/* in simulation or real life (act on simulated processes) */
/* This is the real life implementation, using xbt_os_thread to be portable */
/* to windows and linux. */
-/* Copyright 2006,2007 Malek Cherier, Martin Quinson
- * All right reserved. */
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/xbt_os_thread.h" /* The implementation we use */
/* the implementation would be cleaner (and faster) with ELF symbol aliasing */
#include "xbt/xbt_os_thread.h" /* The implementation we use */
/* the implementation would be cleaner (and faster) with ELF symbol aliasing */
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync_rl, xbt,
- "Synchronization mechanism (RL)");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync, xbt,
+ "Synchronization mechanism");
{
xbt_thread_t res = xbt_new0(s_xbt_thread_t, 1);
res->userparam = param;
res->code = code;
DEBUG1("Create thread %p", res);
{
xbt_thread_t res = xbt_new0(s_xbt_thread_t, 1);
res->userparam = param;
res->code = code;
DEBUG1("Create thread %p", res);
- res->os_thread = xbt_os_thread_create(name, xbt_thread_create_wrapper, res);
+ res->os_thread =
+ xbt_os_thread_create(name, xbt_thread_create_wrapper, res, NULL);
void xbt_cond_timedwait(xbt_cond_t cond, xbt_mutex_t mutex, double delay)
{
DEBUG3("Wait cond %p, mutex %p for %f sec", cond, mutex, delay);
void xbt_cond_timedwait(xbt_cond_t cond, xbt_mutex_t mutex, double delay)
{
DEBUG3("Wait cond %p, mutex %p for %f sec", cond, mutex, delay);
DEBUG3("Done waiting cond %p, mutex %p for %f sec", cond, mutex, delay);
}
DEBUG3("Done waiting cond %p, mutex %p for %f sec", cond, mutex, delay);
}