From: maier Date: Sun, 7 Oct 2012 20:18:31 +0000 (+0000) Subject: Quest for platform independence: [2] fixup thread_management.cc X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efd13237d1734379c73ebf731e521bc2d3037c75;p=dealii-svn.git Quest for platform independence: [2] fixup thread_management.cc git-svn-id: https://svn.dealii.org/branches/branch_cmake@26983 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/thread_management.cc b/deal.II/source/base/thread_management.cc index 09d1c11292..6cb604912c 100644 --- a/deal.II/source/base/thread_management.cc +++ b/deal.II/source/base/thread_management.cc @@ -13,29 +13,11 @@ #include -#include -#include - -#ifdef DEAL_II_USE_MT_POSIX -# include -#endif - -#ifndef DEAL_II_USE_DIRECT_ERRNO_H -# include -#else -# include -#endif -#ifndef DEAL_II_MSVC -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_SYS_SYSCALL_H -# include -#endif +#include +#include +#include +#include DEAL_II_NAMESPACE_OPEN @@ -150,15 +132,10 @@ namespace Threads { #ifdef HAVE_GETPID const pid_t this_id = getpid(); -#elif defined(SYS_gettid) - const int this_id = syscall(SYS_gettid); #else -# ifdef DEAL_II_MSVC const unsigned int this_id = 0; -# else - const pid_t this_id = 0; -# endif #endif + return static_cast(this_id); }