X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f9bb80daccf52fba2e729885ff8cf57f76d4ab1d..c57f6b06e8780443c603dc70c86105676a658b76:/src/xbt/xbt_rl_synchro.c diff --git a/src/xbt/xbt_rl_synchro.c b/src/xbt/xbt_rl_synchro.c index e5ead866df..aee53fbdaa 100644 --- a/src/xbt/xbt_rl_synchro.c +++ b/src/xbt/xbt_rl_synchro.c @@ -1,13 +1,11 @@ -/* $Id$ */ - /* 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. */ @@ -20,8 +18,8 @@ #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"); typedef struct s_xbt_thread_ { xbt_os_thread_t os_thread; @@ -95,7 +93,7 @@ struct xbt_mutex_ { /* KEEP IT IN SYNC WITH OS IMPLEMENTATION (both win and lin) */ #ifdef HAVE_PTHREAD_H pthread_mutex_t m; -#elif defined(WIN32) +#elif defined(_XBT_WIN32) CRITICAL_SECTION lock; #endif }; @@ -131,7 +129,7 @@ void xbt_mutex_destroy(xbt_mutex_t mutex) xbt_os_mutex_destroy((xbt_os_mutex_t) mutex); } -#ifdef WIN32 +#ifdef _XBT_WIN32 enum { /* KEEP IT IN SYNC WITH OS IMPLEM */ SIGNAL = 0, BROADCAST = 1, @@ -144,7 +142,7 @@ typedef struct xbt_cond_ { /* KEEP IT IN SYNC WITH OS IMPLEMENTATION (both win and lin) */ #ifdef HAVE_PTHREAD_H pthread_cond_t c; -#elif defined(WIN32) +#elif defined(_XBT_WIN32) HANDLE events[MAX_EVENTS]; unsigned int waiters_count; /* the number of waiters */