From: Matthias Maier Date: Tue, 9 Oct 2012 13:25:39 +0000 (+0000) Subject: Bugfix: Use gettid for getting the thread number X-Git-Tag: v8.0.0~1079^2~457 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f26c8984505f3457610daae30e927f97da762413;p=dealii.git Bugfix: Use gettid for getting the thread number git-svn-id: https://svn.dealii.org/branches/branch_cmake@27028 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/thread_management.cc b/deal.II/source/base/thread_management.cc index fed96e0a6c..501274ebee 100644 --- a/deal.II/source/base/thread_management.cc +++ b/deal.II/source/base/thread_management.cc @@ -134,7 +134,9 @@ namespace Threads unsigned int this_thread_id () { -#ifdef HAVE_GETPID +#ifdef SYS_gettid + const pid_t this_id = syscall(SYS_gettid); +#elif defined(HAVE_GETPID) const pid_t this_id = getpid(); #else const unsigned int this_id = 0;