diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-04-25 21:33:57 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-04-25 21:33:57 +0200 |
commit | 7c4d50dccf3080965c202f63aa56439e3824eaf3 (patch) | |
tree | 59026bd0f554a24878db82841a508c8fa7ca8356 /nsprpub/pr/src/md/windows/w95thred.c | |
parent | fba28f19754f62b5227650143d5441fc86d4c7d7 (diff) | |
download | UXP-7c4d50dccf3080965c202f63aa56439e3824eaf3.tar UXP-7c4d50dccf3080965c202f63aa56439e3824eaf3.tar.gz UXP-7c4d50dccf3080965c202f63aa56439e3824eaf3.tar.lz UXP-7c4d50dccf3080965c202f63aa56439e3824eaf3.tar.xz UXP-7c4d50dccf3080965c202f63aa56439e3824eaf3.zip |
Revert "Update NSPR to 4.18"
This reverts commit 8781f745556be5d7402d0f3adc67ecfe32fe04a0.
Diffstat (limited to 'nsprpub/pr/src/md/windows/w95thred.c')
-rw-r--r-- | nsprpub/pr/src/md/windows/w95thred.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/nsprpub/pr/src/md/windows/w95thred.c b/nsprpub/pr/src/md/windows/w95thred.c index a365411f5..c27d982a7 100644 --- a/nsprpub/pr/src/md/windows/w95thred.c +++ b/nsprpub/pr/src/md/windows/w95thred.c @@ -1,4 +1,3 @@ - /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -28,32 +27,14 @@ DWORD _pr_currentCPUIndex; int _pr_intsOff = 0; _PRInterruptTable _pr_interruptTable[] = { { 0 } }; -typedef HRESULT (WINAPI *SETTHREADDESCRIPTION)(HANDLE, PCWSTR); -static SETTHREADDESCRIPTION sSetThreadDescription = NULL; - void _PR_MD_EARLY_INIT() { - HMODULE hModule; - #ifndef _PR_USE_STATIC_TLS _pr_currentThreadIndex = TlsAlloc(); _pr_lastThreadIndex = TlsAlloc(); _pr_currentCPUIndex = TlsAlloc(); #endif - -#if defined(_WIN64) && defined(WIN95) - _fd_waiting_for_overlapped_done_lock = PR_NewLock(); -#endif - - // SetThreadDescription is Windows 10 build 1607+ - hModule = GetModuleHandleW(L"kernel32.dll"); - if (hModule) { - sSetThreadDescription = - (SETTHREADDESCRIPTION) GetProcAddress( - hModule, - "SetThreadDescription"); - } } void _PR_MD_CLEANUP_BEFORE_EXIT(void) @@ -69,29 +50,6 @@ void _PR_MD_CLEANUP_BEFORE_EXIT(void) TlsFree(_pr_lastThreadIndex); TlsFree(_pr_currentCPUIndex); #endif - -#if defined(_WIN64) && defined(WIN95) - // For each iteration check if TFO overlapped IOs are down. - if (_fd_waiting_for_overlapped_done_lock) { - PRIntervalTime delay = PR_MillisecondsToInterval(1000); - PRFileDescList *cur; - do { - CheckOverlappedPendingSocketsAreDone(); - - PR_Lock(_fd_waiting_for_overlapped_done_lock); - cur = _fd_waiting_for_overlapped_done; - PR_Unlock(_fd_waiting_for_overlapped_done_lock); -#if defined(DO_NOT_WAIT_FOR_CONNECT_OVERLAPPED_OPERATIONS) - cur = NULL; -#endif - if (cur) { - PR_Sleep(delay); // wait another 1s. - } - } while (cur); - - PR_DestroyLock(_fd_waiting_for_overlapped_done_lock); - } -#endif } PRStatus @@ -232,16 +190,7 @@ _PR_MD_SET_CURRENT_THREAD_NAME(const char *name) { #ifdef _MSC_VER THREADNAME_INFO info; -#endif - - if (sSetThreadDescription) { - WCHAR wideName[MAX_PATH]; - if (MultiByteToWideChar(CP_ACP, 0, name, -1, wideName, MAX_PATH)) { - sSetThreadDescription(GetCurrentThread(), wideName); - } - } -#ifdef _MSC_VER if (!IsDebuggerPresent()) return; |