Threads: Avoid printing pthread_self()

The type used to represent a thread ID is implementation
specific, and may be an opaqe structure, making it unsuitable to be
printed by standard means. Let's use osmo_gettid() instead.

Change-Id: Iaa4d0eaf52b901fff06cc67f8dd8b61ac6084911
Related: OS#5032
This commit is contained in:
Pau Espin 2021-03-01 13:25:28 +01:00
parent d06259f348
commit 17ce7740e5
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ void lockCout()
{
gStreamLock.lock();
Timeval entryTime;
cout << entryTime << " " << pthread_self() << ": ";
cout << entryTime << " " << osmo_gettid() << ": ";
}
@ -64,7 +64,7 @@ void lockCerr()
{
gStreamLock.lock();
Timeval entryTime;
cerr << entryTime << " " << pthread_self() << ": ";
cerr << entryTime << " " << osmo_gettid() << ": ";
}
void unlockCerr()