From 1fcfb40de30f593c4a5258d66825c47d1fc7c7d5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 16 Jan 2002 06:30:27 +0000 Subject: [PATCH] wxThread::GetCurrentId() for Unix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/threadpsx.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index f47319d5e3..50278f17ae 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -928,6 +928,11 @@ int wxThread::GetCPUCount() return -1; } +unsigned long wxThread::GetCurrentId() +{ + return (unsigned long)pthread_self(); +} + bool wxThread::SetConcurrency(size_t level) { #ifdef HAVE_THR_SETCONCURRENCY @@ -986,7 +991,7 @@ wxThreadError wxThread::Create(unsigned int WXUNUSED(stackSize)) #define sched_get_priority_min(_pol_) \ (_pol_ == SCHED_OTHER ? PRI_FG_MIN_NP : PRI_FIFO_MIN) #endif - + int max_prio = sched_get_priority_max(policy), min_prio = sched_get_priority_min(policy), prio = m_internal->GetPriority(); -- 2.45.2