From: Martin Quinson Date: Sun, 13 May 2012 21:17:24 +0000 (+0200) Subject: ensure that this header can be made public by relying on public simgrid_config.h... X-Git-Tag: v3_7~13 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/209b52905757cd5bd0dcf58d53d52d74411fcc55 ensure that this header can be made public by relying on public simgrid_config.h, not private gras_config.h --- diff --git a/src/include/xbt/xbt_os_thread.h b/src/include/xbt/xbt_os_thread.h index e744be5ff5..bcebc8febb 100644 --- a/src/include/xbt/xbt_os_thread.h +++ b/src/include/xbt/xbt_os_thread.h @@ -1,17 +1,14 @@ -/* xbt/xbt_thread.h -- Thread portability layer */ +/* xbt/xbt_os_thread.h -- Thread portability layer */ -/* Copyright (c) 2007, 2009, 2010. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2012. 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. */ - #ifndef _XBT_OS_THREAD_H #define _XBT_OS_THREAD_H -#include "gras_config.h" -#include "xbt/misc.h" /* SG_BEGIN_DECL */ +#include "simgrid_config.h" /* Windows or Posix */ #include "xbt/function_types.h" SG_BEGIN_DECL() @@ -27,12 +24,12 @@ SG_BEGIN_DECL() /** \brief Thread data type (opaque structure) */ typedef struct xbt_os_thread_ *xbt_os_thread_t; -#ifdef HAVE_PTHREAD_H -#include -typedef pthread_key_t xbt_os_thread_key_t; -#elif defined(_XBT_WIN32) +#ifdef _XBT_WIN32 /* defined if this is a windows system, 32bits or 64bits) */ #include typedef DWORD xbt_os_thread_key_t; +#else /* assume that every non-windows system is POSIX-compatible */ +#include +typedef pthread_key_t xbt_os_thread_key_t; #endif /* Calls pthread_atfork() if present, and else does nothing.