This commit is contained in:
Günter Obiltschnig
2024-04-03 07:21:30 +02:00
parent 4892d97f51
commit cbdaa1f369

View File

@@ -24,12 +24,14 @@
#include <signal.h> #include <signal.h>
#include <limits.h> #include <limits.h>
#if POCO_OS == POCO_OS_FREE_BSD #if POCO_OS == POCO_OS_FREE_BSD
# include <sys/thr.h> # include <sys/thr.h>
# include <pthread_np.h> # include <pthread_np.h>
# include <osreldate.h> # include <osreldate.h>
#endif #endif
#if defined(__sun) && defined(__SVR4) #if defined(__sun) && defined(__SVR4)
# if !defined(__EXTENSIONS__) # if !defined(__EXTENSIONS__)
# define __EXTENSIONS__ # define __EXTENSIONS__
@@ -39,6 +41,7 @@
# include <time.h> # include <time.h>
#endif #endif
#if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID #if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_ANDROID
# include <sys/prctl.h> # include <sys/prctl.h>
#endif #endif
@@ -77,6 +80,7 @@ namespace
} }
#endif #endif
namespace namespace
{ {
std::string truncName(const std::string& name, int nameSize = POCO_MAX_THREAD_NAME_LEN) std::string truncName(const std::string& name, int nameSize = POCO_MAX_THREAD_NAME_LEN)
@@ -147,6 +151,7 @@ ThreadImpl::~ThreadImpl()
} }
} }
void ThreadImpl::setNameImpl(const std::string& threadName) void ThreadImpl::setNameImpl(const std::string& threadName)
{ {
std::string realName = threadName; std::string realName = threadName;
@@ -390,6 +395,7 @@ ThreadImpl::TIDImpl ThreadImpl::currentTidImpl()
return pthread_self(); return pthread_self();
} }
long ThreadImpl::currentOsTidImpl() long ThreadImpl::currentOsTidImpl()
{ {
long id = 0; long id = 0;