Name threads for debug purpose

Change-Id: Id99ba394b898b7da0057d4a145ce8dce46122782
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Arnaud Versini
2013-10-18 18:11:33 +02:00
committed by Stephan Bergmann
parent 117b24dbbd
commit ebf5e56e20
5 changed files with 7 additions and 2 deletions

View File

@@ -23,6 +23,7 @@
#include "internal/rtllifecycle.h" #include "internal/rtllifecycle.h"
#include "sal/macros.h" #include "sal/macros.h"
#include "osl/diagnose.h" #include "osl/diagnose.h"
#include <osl/thread.hxx>
#include <cassert> #include <cassert>
#include <string.h> #include <string.h>
@@ -1507,6 +1508,7 @@ static DWORD WINAPI
#endif /* SAL_UNX || SAL_W32 */ #endif /* SAL_UNX || SAL_W32 */
rtl_cache_wsupdate_all (void * arg) rtl_cache_wsupdate_all (void * arg)
{ {
osl::Thread::setName("rtl_cache_wsupdate_all");
unsigned int seconds = sal::static_int_cast< unsigned int >( unsigned int seconds = sal::static_int_cast< unsigned int >(
reinterpret_cast< sal_uIntPtr >(arg)); reinterpret_cast< sal_uIntPtr >(arg));

View File

@@ -684,7 +684,7 @@ void BluetoothServer::cleanupCommunicators()
void SAL_CALL BluetoothServer::run() void SAL_CALL BluetoothServer::run()
{ {
SAL_INFO( "sdremote.bluetooth", "BluetoothServer::run called" ); SAL_INFO( "sdremote.bluetooth", "BluetoothServer::run called" );
osl::Thread::setName("BluetoothServer");
#ifdef LINUX_BLUETOOTH #ifdef LINUX_BLUETOOTH
DBusConnection *pConnection = dbusConnectToNameOnBus(); DBusConnection *pConnection = dbusConnectToNameOnBus();
if( !pConnection ) if( !pConnection )

View File

@@ -128,6 +128,7 @@ DiscoveryService::~DiscoveryService()
void SAL_CALL DiscoveryService::run() void SAL_CALL DiscoveryService::run()
{ {
osl::Thread::setName("DiscoveryService");
// Kept for backwrad compatibility // Kept for backwrad compatibility
char aBuffer[BUFFER_SIZE]; char aBuffer[BUFFER_SIZE];
while ( true ) while ( true )

View File

@@ -603,6 +603,7 @@ void ICEConnectionObserver::terminate(oslThread iceThread)
void ICEConnectionWorker(void * data) void ICEConnectionWorker(void * data)
{ {
osl::Thread::setName("ICEConnectionWorker");
ICEConnectionObserver * pThis = static_cast< ICEConnectionObserver * >( ICEConnectionObserver * pThis = static_cast< ICEConnectionObserver * >(
data); data);
for (;;) for (;;)

View File

@@ -3734,6 +3734,7 @@ void SelectionManager::run( void* pThis )
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "SelectionManager::run\n" ); fprintf(stderr, "SelectionManager::run\n" );
#endif #endif
osl::Thread::setName("SelectionManager");
// dispatch until the cows come home // dispatch until the cows come home
SelectionManager* This = (SelectionManager*)pThis; SelectionManager* This = (SelectionManager*)pThis;