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

View File

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

View File

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

View File

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

View File

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