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 @@
#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 );
......
......@@ -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;
......
......@@ -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) )
{
......
......@@ -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);
......
......@@ -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 ->
......
......@@ -132,6 +132,8 @@ namespace /* private */
unsigned __stdcall ThreadProc(void* pParam)
{
osl_setThreadName("fpicker GetOpenFileName");
CurDirGuard aGuard;
GetFileNameParam* lpgfnp =
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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
......
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