mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
				synced 2025-11-03 21:53:18 +00:00 
			
		
		
		
	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:
		@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user