From 6672f59e99bfe2b9797a91cc9ce6c572f226cc84 Mon Sep 17 00:00:00 2001 From: maier Date: Fri, 28 Sep 2012 14:51:59 +0000 Subject: [PATCH] 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 --- deal.II/source/base/thread_management.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5