summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-09-10 20:10:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-09-10 20:10:37 +0000
commitf0aa17bc5805fab0b91d69a2a3f8ff7bf1c29733 (patch)
tree5bf9f74f781d4b96156237eef6c6fa2e25997269 /src/mir_core
parentf119a286dab1235008715b86020c15af7cf64be8 (diff)
fix for a hangup on exit in KeyboardNotify
git-svn-id: http://svn.miranda-ng.org/main/trunk@15323 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/threads.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mir_core/src/threads.cpp b/src/mir_core/src/threads.cpp
index 23f34cf835..dddcfe2d83 100644
--- a/src/mir_core/src/threads.cpp
+++ b/src/mir_core/src/threads.cpp
@@ -206,7 +206,7 @@ MIR_CORE_DLL(void) KillObjectThreads(void* owner)
// forcibly kill all remaining threads after 5 secs
WaitForSingleObject(hStackMutex, INFINITE);
for (int j = threads.getCount() - 1; j >= 0; j--) {
- THREAD_WAIT_ENTRY* p = threads[j];
+ THREAD_WAIT_ENTRY *p = threads[j];
if (p->pObject == owner) {
char szModuleName[MAX_PATH];
GetModuleFileNameA(p->hOwner, szModuleName, sizeof(szModuleName));
@@ -268,7 +268,8 @@ typedef LONG (WINAPI *pNtQIT)(HANDLE, LONG, PVOID, ULONG, PULONG);
static void* GetCurrentThreadEntryPoint()
{
pNtQIT NtQueryInformationThread = (pNtQIT)GetProcAddress(GetModuleHandle(_T("ntdll.dll")), "NtQueryInformationThread");
- if (NtQueryInformationThread == NULL) return 0;
+ if (NtQueryInformationThread == NULL)
+ return 0;
HANDLE hDupHandle, hCurrentProcess = GetCurrentProcess();
if (!DuplicateHandle(hCurrentProcess, GetCurrentThread(), hCurrentProcess, &hDupHandle, THREAD_QUERY_INFORMATION, FALSE, 0)) {
@@ -287,7 +288,7 @@ MIR_CORE_DLL(INT_PTR) Thread_Push(HINSTANCE hInst, void* pOwner)
{
ResetEvent(hThreadQueueEmpty); // thread list is not empty
if (WaitForSingleObject(hStackMutex, INFINITE) == WAIT_OBJECT_0) {
- THREAD_WAIT_ENTRY* p = (THREAD_WAIT_ENTRY*)mir_calloc(sizeof(THREAD_WAIT_ENTRY));
+ THREAD_WAIT_ENTRY *p = (THREAD_WAIT_ENTRY*)mir_calloc(sizeof(THREAD_WAIT_ENTRY));
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &p->hThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
p->dwThreadId = GetCurrentThreadId();