summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-22 17:42:42 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-25 13:21:57 +0200
commitd386f88774df977691f9cb6ab231aa5b085d0b70 (patch)
tree2e66981b0deab4eddaf3389cd8b7fb6c21004f57
parentb70fb7d704aa721cf7b1f3ce1120f84f89429479 (diff)
set names on the Win32-only threads
Nice to see what weird threads are running. Change-Id: Ic9888aa3260d0aeb5858cde5415571ab23c75484
-rw-r--r--dtrans/source/win32/clipb/MtaOleClipb.cxx4
-rw-r--r--dtrans/source/win32/dnd/source.cxx3
-rw-r--r--dtrans/source/win32/dnd/target.cxx3
-rw-r--r--fpicker/source/win32/filepicker/asynceventnotifier.cxx3
-rw-r--r--fpicker/source/win32/filepicker/asyncrequests.cxx2
-rw-r--r--fpicker/source/win32/filepicker/getfilenamewrapper.cxx2
-rw-r--r--fpicker/source/win32/folderpicker/MtaFop.cxx3
-rw-r--r--sal/osl/w32/dllentry.c3
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx2
9 files changed, 25 insertions, 0 deletions
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx
index 1747eecdaa03..c28d56493791 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.cxx
+++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx
@@ -40,6 +40,7 @@
#include "MtaOleClipb.hxx"
#include <osl/conditn.hxx>
+#include <osl/thread.h>
#include <wchar.h>
#include <process.h>
@@ -740,6 +741,8 @@ unsigned int CMtaOleClipboard::run( )
unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
{
+ osl_setThreadName("CMtaOleClipboard::run()");
+
CMtaOleClipboard* pInst =
reinterpret_cast<CMtaOleClipboard*>( pParam );
OSL_ASSERT( NULL != pInst );
@@ -749,6 +752,7 @@ unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID pParam )
{
+ osl_setThreadName("CMtaOleClipboard::clipboardChangedNotifierThreadProc()");
CMtaOleClipboard* pInst = reinterpret_cast< CMtaOleClipboard* >( pParam );
OSL_ASSERT( NULL != pInst );
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index aed131fe94f7..d7907f59c8aa 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -30,6 +30,7 @@
#include "sourcecontext.hxx"
#include "../../inc/DtObjFactory.hxx"
#include <rtl/ustring.h>
+#include <osl/thread.h>
#include <winuser.h>
#include <stdio.h>
@@ -310,6 +311,8 @@ Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (Ru
XSourceListener. */
unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
{
+ osl_setThreadName("DragSource DndOleSTAFunc");
+
// The structure contains all arguments for DoDragDrop and other
DragSource *pSource= (DragSource*)pParams;
diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx
index 6a6afe898e43..f7f770444ab9 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/dtrans/source/win32/dnd/target.cxx
@@ -27,6 +27,7 @@
#include "targetdropcontext.hxx"
#include "targetdragcontext.hxx"
#include <rtl/ustring.h>
+#include <osl/thread.h>
using namespace cppu;
using namespace osl;
@@ -185,6 +186,8 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments )
// DoDragDrop. The thread also notifies all XSourceListener.
DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
{
+ osl_setThreadName("DropTarget DndTargetOleSTAFunc");
+
HRESULT hr= OleInitialize( NULL);
if( SUCCEEDED( hr) )
{
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index 7d116d71620d..b7df994283a2 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -18,6 +18,7 @@
*/
#include <osl/diagnose.h>
+#include <osl/thread.h>
#include "asynceventnotifier.hxx"
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
@@ -297,6 +298,8 @@ void SAL_CALL CAsyncEventNotifier::run()
unsigned int WINAPI CAsyncEventNotifier::ThreadProc(LPVOID pParam)
{
+ osl_setThreadName("fpicker CAsyncEventNotifier::run()");
+
CAsyncEventNotifier* pInst = reinterpret_cast< CAsyncEventNotifier* >(pParam);
OSL_ASSERT(pInst);
diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx
index 228c9ea98a50..e8ca9bcc64d4 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.cxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -152,6 +152,8 @@ void AsyncRequests::triggerRequestThreadAware(const RequestRef& rRequest,
void SAL_CALL AsyncRequests::run()
{
+ osl_setThreadName("fpicker::win32::vista::AsyncRequests");
+
static const ::sal_Int32 TIME_TO_WAIT_FOR_NEW_REQUESTS = 250;
// SYNCHRONIZED ->
diff --git a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
index 6e1446d66a7c..34202b017f6c 100644
--- a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
+++ b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
@@ -132,6 +132,8 @@ namespace /* private */
unsigned __stdcall ThreadProc(void* pParam)
{
+ osl_setThreadName("fpicker GetOpenFileName");
+
CurDirGuard aGuard;
GetFileNameParam* lpgfnp =
diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx
index cbab83b6e750..d832ddf0aa3e 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.cxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.cxx
@@ -18,6 +18,7 @@
*/
#include <osl/diagnose.h>
+#include <osl/thread.h>
#include <osl/conditn.hxx>
#include "MtaFop.hxx"
@@ -738,6 +739,8 @@ unsigned int CMtaFolderPicker::run( )
unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam )
{
+ osl_setThreadName("fpicker CMtaFolderPicker::run()");
+
CMtaFolderPicker* pInst =
reinterpret_cast<CMtaFolderPicker*>( pParam );
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index 1441f3e291a7..f16cab7e773a 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -32,6 +32,7 @@
#include <float.h>
#include <osl/mutex.h>
+#include <osl/thread.h>
#include "internal/rtllifecycle.h"
@@ -260,6 +261,8 @@ static DWORD GetParentProcessId()
static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam )
{
+ osl_setThreadName("headless ParentMonitorThread");
+
DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam;
HANDLE hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, dwParentProcessId );
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 584d6b040f55..6bd9a624f922 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -472,6 +472,8 @@ LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
DWORD WINAPI SystrayThread( LPVOID /*lpParam*/ )
{
+ osl_setThreadName("SystrayThread");
+
aListenerWindow = CreateWindowExA(0,
QUICKSTART_CLASSNAME, // registered class name
QUICKSTART_WINDOWNAME, // window name