From: maier Date: Fri, 28 Sep 2012 14:51:59 +0000 (+0000) Subject: Prefer getpid() over a direct syscall. Was there a reason for this? X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6672f59e99bfe2b9797a91cc9ce6c572f226cc84;p=dealii-svn.git Prefer getpid() over a direct syscall. Was there a reason for this? git-svn-id: https://svn.dealii.org/branches/branch_cmake@26840 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/thread_management.cc b/deal.II/source/base/thread_management.cc index 2400d2765d..babab8defc 100644 --- a/deal.II/source/base/thread_management.cc +++ b/deal.II/source/base/thread_management.cc @@ -148,10 +148,10 @@ namespace Threads unsigned int this_thread_id () { -#ifdef SYS_gettid - const int this_id = syscall(SYS_gettid); -#elif HAVE_GETPID +#if HAVE_GETPID const pid_t this_id = getpid(); +#elif SYS_gettid + const int this_id = syscall(SYS_gettid); #else # ifdef DEAL_II_MSVC const unsigned int this_id = 0;