mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-02 13:13:17 +00:00
Use pthread_setname_np to name threads
osmo-trx can start a considerable amount of threads that can make debugging it challenging at least. By using phtread_setname_np, the system sets a meaningful name to the thread which can be seen while debugging with gdb or by printing /proc/$pid/task/$tid/comm. Now we also log system TID when setting the name so we can identify different tasks in /proc even if pthread_setname_np fails. Change-Id: I84711739c3e224cb383fd12b6db933785b28209e
This commit is contained in:
committed by
Harald Welte
parent
207d8a2624
commit
5b60c98769
@@ -28,11 +28,11 @@ PRBSTest_SOURCES = PRBSTest.cpp
|
||||
|
||||
InterthreadTest_SOURCES = InterthreadTest.cpp
|
||||
InterthreadTest_LDADD = $(COMMON_LA)
|
||||
InterthreadTest_LDFLAGS = -lpthread
|
||||
InterthreadTest_LDFLAGS = -lpthread $(AM_LDFLAGS)
|
||||
|
||||
SocketsTest_SOURCES = SocketsTest.cpp
|
||||
SocketsTest_LDADD = $(COMMON_LA)
|
||||
SocketsTest_LDFLAGS = -lpthread
|
||||
SocketsTest_LDFLAGS = -lpthread $(AM_LDFLAGS)
|
||||
|
||||
TimevalTest_SOURCES = TimevalTest.cpp
|
||||
TimevalTest_LDADD = $(COMMON_LA)
|
||||
|
||||
Reference in New Issue
Block a user