Kaydet (Commit) d386f887 authored tarafından Michael Stahl's avatar Michael Stahl

set names on the Win32-only threads

Nice to see what weird threads are running.

Change-Id: Ic9888aa3260d0aeb5858cde5415571ab23c75484
üst b70fb7d7
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "MtaOleClipb.hxx" #include "MtaOleClipb.hxx"
#include <osl/conditn.hxx> #include <osl/conditn.hxx>
#include <osl/thread.h>
#include <wchar.h> #include <wchar.h>
#include <process.h> #include <process.h>
...@@ -740,6 +741,8 @@ unsigned int CMtaOleClipboard::run( ) ...@@ -740,6 +741,8 @@ unsigned int CMtaOleClipboard::run( )
unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam ) unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
{ {
osl_setThreadName("CMtaOleClipboard::run()");
CMtaOleClipboard* pInst = CMtaOleClipboard* pInst =
reinterpret_cast<CMtaOleClipboard*>( pParam ); reinterpret_cast<CMtaOleClipboard*>( pParam );
OSL_ASSERT( NULL != pInst ); OSL_ASSERT( NULL != pInst );
...@@ -749,6 +752,7 @@ unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam ) ...@@ -749,6 +752,7 @@ unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID pParam ) unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID pParam )
{ {
osl_setThreadName("CMtaOleClipboard::clipboardChangedNotifierThreadProc()");
CMtaOleClipboard* pInst = reinterpret_cast< CMtaOleClipboard* >( pParam ); CMtaOleClipboard* pInst = reinterpret_cast< CMtaOleClipboard* >( pParam );
OSL_ASSERT( NULL != pInst ); OSL_ASSERT( NULL != pInst );
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "sourcecontext.hxx" #include "sourcecontext.hxx"
#include "../../inc/DtObjFactory.hxx" #include "../../inc/DtObjFactory.hxx"
#include <rtl/ustring.h> #include <rtl/ustring.h>
#include <osl/thread.h>
#include <winuser.h> #include <winuser.h>
#include <stdio.h> #include <stdio.h>
...@@ -310,6 +311,8 @@ Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (Ru ...@@ -310,6 +311,8 @@ Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( ) throw (Ru
XSourceListener. */ XSourceListener. */
unsigned __stdcall DndOleSTAFunc(LPVOID pParams) unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
{ {
osl_setThreadName("DragSource DndOleSTAFunc");
// The structure contains all arguments for DoDragDrop and other // The structure contains all arguments for DoDragDrop and other
DragSource *pSource= (DragSource*)pParams; DragSource *pSource= (DragSource*)pParams;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "targetdropcontext.hxx" #include "targetdropcontext.hxx"
#include "targetdragcontext.hxx" #include "targetdragcontext.hxx"
#include <rtl/ustring.h> #include <rtl/ustring.h>
#include <osl/thread.h>
using namespace cppu; using namespace cppu;
using namespace osl; using namespace osl;
...@@ -185,6 +186,8 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments ) ...@@ -185,6 +186,8 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments )
// DoDragDrop. The thread also notifies all XSourceListener. // DoDragDrop. The thread also notifies all XSourceListener.
DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
{ {
osl_setThreadName("DropTarget DndTargetOleSTAFunc");
HRESULT hr= OleInitialize( NULL); HRESULT hr= OleInitialize( NULL);
if( SUCCEEDED( hr) ) if( SUCCEEDED( hr) )
{ {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/thread.h>
#include "asynceventnotifier.hxx" #include "asynceventnotifier.hxx"
#include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerListener.hpp> #include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
...@@ -297,6 +298,8 @@ void SAL_CALL CAsyncEventNotifier::run() ...@@ -297,6 +298,8 @@ void SAL_CALL CAsyncEventNotifier::run()
unsigned int WINAPI CAsyncEventNotifier::ThreadProc(LPVOID pParam) unsigned int WINAPI CAsyncEventNotifier::ThreadProc(LPVOID pParam)
{ {
osl_setThreadName("fpicker CAsyncEventNotifier::run()");
CAsyncEventNotifier* pInst = reinterpret_cast< CAsyncEventNotifier* >(pParam); CAsyncEventNotifier* pInst = reinterpret_cast< CAsyncEventNotifier* >(pParam);
OSL_ASSERT(pInst); OSL_ASSERT(pInst);
......
...@@ -152,6 +152,8 @@ void AsyncRequests::triggerRequestThreadAware(const RequestRef& rRequest, ...@@ -152,6 +152,8 @@ void AsyncRequests::triggerRequestThreadAware(const RequestRef& rRequest,
void SAL_CALL AsyncRequests::run() void SAL_CALL AsyncRequests::run()
{ {
osl_setThreadName("fpicker::win32::vista::AsyncRequests");
static const ::sal_Int32 TIME_TO_WAIT_FOR_NEW_REQUESTS = 250; static const ::sal_Int32 TIME_TO_WAIT_FOR_NEW_REQUESTS = 250;
// SYNCHRONIZED -> // SYNCHRONIZED ->
......
...@@ -132,6 +132,8 @@ namespace /* private */ ...@@ -132,6 +132,8 @@ namespace /* private */
unsigned __stdcall ThreadProc(void* pParam) unsigned __stdcall ThreadProc(void* pParam)
{ {
osl_setThreadName("fpicker GetOpenFileName");
CurDirGuard aGuard; CurDirGuard aGuard;
GetFileNameParam* lpgfnp = GetFileNameParam* lpgfnp =
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/thread.h>
#include <osl/conditn.hxx> #include <osl/conditn.hxx>
#include "MtaFop.hxx" #include "MtaFop.hxx"
...@@ -738,6 +739,8 @@ unsigned int CMtaFolderPicker::run( ) ...@@ -738,6 +739,8 @@ unsigned int CMtaFolderPicker::run( )
unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam ) unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam )
{ {
osl_setThreadName("fpicker CMtaFolderPicker::run()");
CMtaFolderPicker* pInst = CMtaFolderPicker* pInst =
reinterpret_cast<CMtaFolderPicker*>( pParam ); reinterpret_cast<CMtaFolderPicker*>( pParam );
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <float.h> #include <float.h>
#include <osl/mutex.h> #include <osl/mutex.h>
#include <osl/thread.h>
#include "internal/rtllifecycle.h" #include "internal/rtllifecycle.h"
...@@ -260,6 +261,8 @@ static DWORD GetParentProcessId() ...@@ -260,6 +261,8 @@ static DWORD GetParentProcessId()
static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam ) static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam )
{ {
osl_setThreadName("headless ParentMonitorThread");
DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam; DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam;
HANDLE hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, dwParentProcessId ); HANDLE hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, dwParentProcessId );
......
...@@ -472,6 +472,8 @@ LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP ...@@ -472,6 +472,8 @@ LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
DWORD WINAPI SystrayThread( LPVOID /*lpParam*/ ) DWORD WINAPI SystrayThread( LPVOID /*lpParam*/ )
{ {
osl_setThreadName("SystrayThread");
aListenerWindow = CreateWindowExA(0, aListenerWindow = CreateWindowExA(0,
QUICKSTART_CLASSNAME, // registered class name QUICKSTART_CLASSNAME, // registered class name
QUICKSTART_WINDOWNAME, // window name QUICKSTART_WINDOWNAME, // window name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment