This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/22948 )
Change subject: Threads.cpp: Use already existing gettid wrapper function
......................................................................
Threads.cpp: Use already existing gettid wrapper function
A wrapper function with better support already exists in debug.c and
announced in debug.h. Let's use that one instead.
Related: OS#5027
Change-Id: I2ccf94f95a531d5873da2a4681cf89cbc5b31422
---
M CommonLibs/Threads.cpp
1 file changed, 1 insertion(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/48/22948/1
diff --git a/CommonLibs/Threads.cpp b/CommonLibs/Threads.cpp
index 020d94e..d8dab57 100644
--- a/CommonLibs/Threads.cpp
+++ b/CommonLibs/Threads.cpp
@@ -32,12 +32,6 @@
#include "Timeval.h"
#include "Logger.h"
-#ifndef gettid
-#include <sys/syscall.h>
-#define gettid() syscall(SYS_gettid)
-#endif
-
-
using namespace std;
#ifndef HAVE_ATOMIC_OPS
@@ -114,7 +108,7 @@
void set_selfthread_name(const char *name)
{
pthread_t selfid = pthread_self();
- pid_t tid = gettid();
+ pid_t tid = my_gettid();
if (pthread_setname_np(selfid, name) == 0) {
LOG(INFO) << "Thread "<< selfid << " (task " << tid << ") set name: " << name;
} else {
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/22948
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I2ccf94f95a531d5873da2a4681cf89cbc5b31422
Gerrit-Change-Number: 22948
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210217/2e6fad31/attachment.htm>