diff options
author | Jan Kotas <jkotas@microsoft.com> | 2015-11-10 07:15:23 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2015-11-10 07:15:23 -0800 |
commit | ed02ec796d03e1c058a6ad8e71923add5553cc84 (patch) | |
tree | 60252080725c770611e07a4d4db5d22dccd806d9 | |
parent | 077d5cb53bf9c0339cca6e2dc64e1d523987098d (diff) | |
parent | e1cae46879e4cb5c9b0fadc79b1c07dd85841f27 (diff) | |
download | coreclr-ed02ec796d03e1c058a6ad8e71923add5553cc84.tar.gz coreclr-ed02ec796d03e1c058a6ad8e71923add5553cc84.tar.bz2 coreclr-ed02ec796d03e1c058a6ad8e71923add5553cc84.zip |
Merge pull request #1999 from adityamandaleeka/remove_suspension
More PAL thread cleanup (last one)
-rw-r--r-- | src/pal/src/cruntime/misc.cpp | 23 | ||||
-rw-r--r-- | src/pal/src/file/find.cpp | 17 | ||||
-rw-r--r-- | src/pal/src/include/pal/corunix.hpp | 4 | ||||
-rw-r--r-- | src/pal/src/include/pal/procobj.hpp | 1 | ||||
-rw-r--r-- | src/pal/src/include/pal/synchobjects.hpp | 5 | ||||
-rw-r--r-- | src/pal/src/init/pal.cpp | 3 | ||||
-rw-r--r-- | src/pal/src/map/map.cpp | 14 | ||||
-rw-r--r-- | src/pal/src/misc/strutil.cpp | 7 | ||||
-rw-r--r-- | src/pal/src/objmgr/palobjbase.cpp | 7 | ||||
-rw-r--r-- | src/pal/src/synchmgr/synchmanager.cpp | 57 | ||||
-rw-r--r-- | src/pal/src/synchmgr/synchmanager.hpp | 16 | ||||
-rw-r--r-- | src/pal/src/thread/process.cpp | 2 | ||||
-rw-r--r-- | src/pal/src/thread/thread.cpp | 9 |
13 files changed, 53 insertions, 112 deletions
diff --git a/src/pal/src/cruntime/misc.cpp b/src/pal/src/cruntime/misc.cpp index e46274ead8..9910d7e687 100644 --- a/src/pal/src/cruntime/misc.cpp +++ b/src/pal/src/cruntime/misc.cpp @@ -47,27 +47,6 @@ CRITICAL_SECTION gcsEnvironment; using namespace CorUnix; -namespace CorUnix -{ - int InternalRand(CPalThread *pthrCurrent); - - /*++ - Function: - InternalRand - - Wrapper for rand. - --*/ - int - InternalRand( - CPalThread *pthrCurrent - ) - { - int nRet; - nRet = rand(); - return nRet; - } -} - /*++ Function: _gcvt_s @@ -271,7 +250,7 @@ PAL_rand(void) PERF_ENTRY(rand); ENTRY("rand(void)\n"); - ret = (InternalRand(InternalGetCurrentThread()) % (PAL_RAND_MAX + 1)); + ret = (rand() % (PAL_RAND_MAX + 1)); LOGEXIT("rand() returning %d\n", ret); PERF_EXIT(rand); diff --git a/src/pal/src/file/find.cpp b/src/pal/src/file/find.cpp index 80e9197caa..cdeb0ce082 100644 --- a/src/pal/src/file/find.cpp +++ b/src/pal/src/file/find.cpp @@ -43,7 +43,6 @@ SET_DEFAULT_DEBUG_CHANNEL(FILE); namespace CorUnix { int InternalGlob( - CPalThread *pthrCurrent, const char *szPattern, int nFlags, #if ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS @@ -59,7 +58,6 @@ namespace CorUnix Input parameters: - pthrCurrent = reference to executing thread szPattern = pointer to a pathname pattern to be expanded nFlags = arguments to modify the behavior of glob pnErrFunc = pointer to a routine that handles errors during the glob call @@ -76,7 +74,6 @@ namespace CorUnix --*/ int InternalGlob( - CPalThread *pthrCurrent, const char *szPattern, int nFlags, #if ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS @@ -102,7 +99,6 @@ static BOOL FILEDosGlobA( static int FILEGlobQsortCompare(const void *in_str1, const void *in_str2); static int FILEGlobFromSplitPath( - CPalThread *pthrCurrent, const char *dir, const char *fname, const char *ext, @@ -767,8 +763,7 @@ in broken-down form like _splitpath produces. ie. calling splitpath on a pattern then calling this function should produce the same result as just calling glob() on the pattern. --*/ -static int FILEGlobFromSplitPath( CPalThread *pthrCurrent, - const char *dir, +static int FILEGlobFromSplitPath( const char *dir, const char *fname, const char *ext, int flags, @@ -811,7 +806,7 @@ static int FILEGlobFromSplitPath( CPalThread *pthrCurrent, #ifdef GLOB_QUOTE flags |= GLOB_QUOTE; #endif // GLOB_QUOTE - Ret = InternalGlob(pthrCurrent, EscapedPattern, flags, NULL, pgGlob); + Ret = InternalGlob(EscapedPattern, flags, NULL, pgGlob); #ifdef GLOB_NOMATCH if (Ret == GLOB_NOMATCH) @@ -950,7 +945,7 @@ static BOOL FILEDosGlobA( CPalThread *pthrCurrent, if ( !(A && B) ) { /* the original pattern */ - globResult = FILEGlobFromSplitPath(pthrCurrent, Dir, Filename, Ext, 0, pgGlob); + globResult = FILEGlobFromSplitPath(Dir, Filename, Ext, 0, pgGlob); if ( globResult != 0 ) { goto done; @@ -959,7 +954,7 @@ static BOOL FILEDosGlobA( CPalThread *pthrCurrent, if (C) { /* the original pattern but '.' prepended to filename */ - globResult = FILEGlobFromSplitPath(pthrCurrent, Dir, Filename - 1, Ext, + globResult = FILEGlobFromSplitPath(Dir, Filename - 1, Ext, GLOB_APPEND, pgGlob); if ( globResult != 0 ) { @@ -973,7 +968,7 @@ static BOOL FILEDosGlobA( CPalThread *pthrCurrent, /* if (A && B), this is the first glob() call. The first call to glob must use flags = 0, while proceeding calls should set the GLOB_APPEND flag. */ - globResult = FILEGlobFromSplitPath(pthrCurrent, Dir, Filename, "", + globResult = FILEGlobFromSplitPath(Dir, Filename, "", (A && B)?0:GLOB_APPEND, pgGlob); if ( globResult != 0 ) { @@ -983,7 +978,7 @@ static BOOL FILEDosGlobA( CPalThread *pthrCurrent, if (C) { /* omit the extension and prepend '.' to filename */ - globResult = FILEGlobFromSplitPath(pthrCurrent, Dir, Filename - 1, "", + globResult = FILEGlobFromSplitPath(Dir, Filename - 1, "", GLOB_APPEND, pgGlob); if ( globResult != 0 ) { diff --git a/src/pal/src/include/pal/corunix.hpp b/src/pal/src/include/pal/corunix.hpp index 96a8d682a6..aa2af36829 100644 --- a/src/pal/src/include/pal/corunix.hpp +++ b/src/pal/src/include/pal/corunix.hpp @@ -107,9 +107,7 @@ namespace CorUnix ); void - FreeBuffer( - CPalThread *pthr - ); + FreeBuffer(); const WCHAR * GetString() diff --git a/src/pal/src/include/pal/procobj.hpp b/src/pal/src/include/pal/procobj.hpp index 10ed932ef6..8500fd1f09 100644 --- a/src/pal/src/include/pal/procobj.hpp +++ b/src/pal/src/include/pal/procobj.hpp @@ -114,7 +114,6 @@ namespace CorUnix PAL_ERROR InitializeProcessCommandLine( - CPalThread *pThread, LPWSTR lpwstrCmdLine, LPWSTR lpwstrFullPath ); diff --git a/src/pal/src/include/pal/synchobjects.hpp b/src/pal/src/include/pal/synchobjects.hpp index ea0e2d334d..6c78b3c8a8 100644 --- a/src/pal/src/include/pal/synchobjects.hpp +++ b/src/pal/src/include/pal/synchobjects.hpp @@ -168,7 +168,7 @@ namespace CorUnix } #if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING - PAL_ERROR RunDeferredThreadConditionSignalings(CPalThread * pthrCurrent); + PAL_ERROR RunDeferredThreadConditionSignalings(); #endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING // NOTE: the following methods provide non-synchronized access to @@ -205,8 +205,7 @@ namespace CorUnix class CPalSynchMgrController { public: - static IPalSynchronizationManager * CreatePalSynchronizationManager( - CPalThread * pthrCurrent); + static IPalSynchronizationManager * CreatePalSynchronizationManager(); static PAL_ERROR StartWorker(CPalThread * pthrCurrent); diff --git a/src/pal/src/init/pal.cpp b/src/pal/src/init/pal.cpp index 00ce8148da..15ecae6028 100644 --- a/src/pal/src/init/pal.cpp +++ b/src/pal/src/init/pal.cpp @@ -378,7 +378,7 @@ Initialize( // Initialize the synchronization manager // g_pSynchronizationManager = - CPalSynchMgrController::CreatePalSynchronizationManager(pThread); + CPalSynchMgrController::CreatePalSynchronizationManager(); if (NULL == g_pSynchronizationManager) { @@ -419,7 +419,6 @@ Initialize( } palError = InitializeProcessCommandLine( - pThread, command_line, exe_path); diff --git a/src/pal/src/map/map.cpp b/src/pal/src/map/map.cpp index ea59b71330..dd87c2bb87 100644 --- a/src/pal/src/map/map.cpp +++ b/src/pal/src/map/map.cpp @@ -80,7 +80,6 @@ static PMAPPED_VIEW_LIST FindSharedMappingReplacement(CPalThread *pThread, dev_t static PAL_ERROR MAPRecordMapping( - CPalThread *pThread, IPalObject *pMappingObject, void *pPEBaseAddress, void *addr, @@ -90,7 +89,6 @@ MAPRecordMapping( static PAL_ERROR MAPmmapAndRecord( - CPalThread *pThread, IPalObject *pMappingObject, void *pPEBaseAddress, void *addr, @@ -2185,7 +2183,6 @@ static LONG NativeMapHolderRelease(CPalThread *pThread, NativeMapHolder * thisNM // This call assumes the mapping_critsec has already been taken. static PAL_ERROR MAPRecordMapping( - CPalThread *pThread, IPalObject *pMappingObject, void *pPEBaseAddress, void *addr, @@ -2225,7 +2222,6 @@ MAPRecordMapping( // This call assumes the mapping_critsec has already been taken. static PAL_ERROR MAPmmapAndRecord( - CPalThread *pThread, IPalObject *pMappingObject, void *pPEBaseAddress, void *addr, @@ -2250,7 +2246,7 @@ MAPmmapAndRecord( } else { - palError = MAPRecordMapping(pThread, pMappingObject, pPEBaseAddress, pvBaseAddress, len, prot); + palError = MAPRecordMapping(pMappingObject, pPEBaseAddress, pvBaseAddress, len, prot); if (NO_ERROR != palError) { if (-1 == munmap(pvBaseAddress, len)) @@ -2475,7 +2471,7 @@ void * MAPMapPEFile(HANDLE hFile) headerSize = VIRTUAL_PAGE_SIZE; // if there are lots of sections, this could be wrong //first, map the PE header to the first page in the image. Get pointers to the section headers - palError = MAPmmapAndRecord(pThread, pFileObject, loadedBase, + palError = MAPmmapAndRecord(pFileObject, loadedBase, loadedBase, headerSize, PROT_READ, MAP_FILE|MAP_PRIVATE|MAP_FIXED, fd, 0, (void**)&loadedHeader); if (NO_ERROR != palError) @@ -2543,7 +2539,7 @@ void * MAPMapPEFile(HANDLE hFile) if ((char*)prevSectionBase + prevSectionSizeInMemory < sectionBase) { char* gapBase = (char*)prevSectionBase + prevSectionSizeInMemory; - palError = MAPRecordMapping(pThread, pFileObject, + palError = MAPRecordMapping(pFileObject, loadedBase, (void*)gapBase, (char*)sectionBase - gapBase, @@ -2565,7 +2561,7 @@ void * MAPMapPEFile(HANDLE hFile) if (currentHeader.Characteristics & IMAGE_SCN_MEM_WRITE) prot |= PROT_WRITE; - palError = MAPmmapAndRecord(pThread, pFileObject, loadedBase, + palError = MAPmmapAndRecord(pFileObject, loadedBase, sectionBase, currentHeader.SizeOfRawData, prot, @@ -2600,7 +2596,7 @@ void * MAPMapPEFile(HANDLE hFile) if ((char*)prevSectionBase + prevSectionSizeInMemory < imageEnd) { char* gapBase = (char*)prevSectionBase + prevSectionSizeInMemory; - palError = MAPRecordMapping(pThread, pFileObject, + palError = MAPRecordMapping(pFileObject, loadedBase, (void*)gapBase, imageEnd - gapBase, diff --git a/src/pal/src/misc/strutil.cpp b/src/pal/src/misc/strutil.cpp index e0f2cb25f2..10aa6d179e 100644 --- a/src/pal/src/misc/strutil.cpp +++ b/src/pal/src/misc/strutil.cpp @@ -87,16 +87,11 @@ Function: Frees the contained string buffer -Parameters: - pthr -- thread data for calling thread --*/ void -CPalString::FreeBuffer( - CPalThread *pthr - ) +CPalString::FreeBuffer() { _ASSERTE(NULL != m_pwsz); - InternalFree(const_cast<WCHAR*>(m_pwsz)); } diff --git a/src/pal/src/objmgr/palobjbase.cpp b/src/pal/src/objmgr/palobjbase.cpp index 63e0f866d6..5e45106182 100644 --- a/src/pal/src/objmgr/palobjbase.cpp +++ b/src/pal/src/objmgr/palobjbase.cpp @@ -340,11 +340,6 @@ CPalObjectBase::~CPalObjectBase() { ENTRY("CPalObjectBase::~CPalObjectBase(this = %p)\n", this); - // There is no need to call InternalGetCurrentThread here because - // ReleaseReference already stores the thread object that - // deletes this object in m_pthrCleanup to make sure the - // thread object is alive throughout the object cleanup process. - if (NULL != m_pvImmutableData) { InternalFree(m_pvImmutableData); @@ -357,7 +352,7 @@ CPalObjectBase::~CPalObjectBase() if (NULL != m_oa.sObjectName.GetString()) { - m_oa.sObjectName.FreeBuffer(m_pthrCleanup); + m_oa.sObjectName.FreeBuffer(); } LOGEXIT("CPalObjectBase::~CPalObjectBase\n"); diff --git a/src/pal/src/synchmgr/synchmanager.cpp b/src/pal/src/synchmgr/synchmanager.cpp index 0adbb3d72e..5408d936d5 100644 --- a/src/pal/src/synchmgr/synchmanager.cpp +++ b/src/pal/src/synchmgr/synchmanager.cpp @@ -94,10 +94,9 @@ namespace CorUnix Creates the Synchronization Manager. It must be called once per process. --*/ - IPalSynchronizationManager * CPalSynchMgrController::CreatePalSynchronizationManager( - CPalThread *pthrCurrent) + IPalSynchronizationManager * CPalSynchMgrController::CreatePalSynchronizationManager() { - return CPalSynchronizationManager::CreatePalSynchronizationManager(pthrCurrent); + return CPalSynchronizationManager::CreatePalSynchronizationManager(); }; /*++ @@ -1474,13 +1473,12 @@ namespace CorUnix Creates the Synchronization Manager. Private method, it is called only by CPalSynchMgrController. --*/ - IPalSynchronizationManager * CPalSynchronizationManager::CreatePalSynchronizationManager( - CPalThread *pthrCurrent) + IPalSynchronizationManager * CPalSynchronizationManager::CreatePalSynchronizationManager() { - IPalSynchronizationManager * pRet = NULL; + IPalSynchronizationManager * pRet = NULL; if (s_pObjSynchMgr == NULL) { - Initialize(pthrCurrent); + Initialize(); pRet = static_cast<IPalSynchronizationManager *>(s_pObjSynchMgr); } else @@ -1497,9 +1495,8 @@ namespace CorUnix Internal Synchronization Manager initialization --*/ - PAL_ERROR CPalSynchronizationManager::Initialize( - CPalThread *pthrCurrent) - { + PAL_ERROR CPalSynchronizationManager::Initialize() + { PAL_ERROR palErr = NO_ERROR; LONG lInit; CPalSynchronizationManager * pSynchManager = NULL; @@ -1525,7 +1522,7 @@ namespace CorUnix goto I_exit; } - if (!pSynchManager->CreateProcessPipe(pthrCurrent)) + if (!pSynchManager->CreateProcessPipe()) { ERROR("Unable to create process pipe \n"); palErr = ERROR_OPEN_FAILED; @@ -1535,8 +1532,8 @@ namespace CorUnix s_pObjSynchMgr = pSynchManager; // Initialization was successful - g_pSynchronizationManager = - static_cast<IPalSynchronizationManager *>(pSynchManager); + g_pSynchronizationManager = + static_cast<IPalSynchronizationManager *>(pSynchManager); s_lInitStatus = (LONG)SynchMgrStatusRunning; I_exit: @@ -1545,7 +1542,7 @@ namespace CorUnix s_lInitStatus = (LONG)SynchMgrStatusError; if (NULL != pSynchManager) { - pSynchManager->ShutdownProcessPipe(pthrCurrent); + pSynchManager->ShutdownProcessPipe(); } s_pObjSynchMgr = NULL; g_pSynchronizationManager = NULL; @@ -1648,13 +1645,13 @@ namespace CorUnix SynchMgrStatusRunning, lInit); // We intentionally not set s_lInitStatus to SynchMgrStatusError // cause this could interfere with a previous thread already - // executing shutdown + // executing shutdown palErr = ERROR_INTERNAL_ERROR; goto PFS_exit; } // Discard process monitoring for process waits - pSynchManager->DiscardMonitoredProcesses(pthrCurrent); + pSynchManager->DiscardMonitoredProcesses(pthrCurrent); if (NULL == pSynchManager->m_pipoThread) { @@ -1663,10 +1660,9 @@ namespace CorUnix // sometime after having called CreatePalSynchronizationManager, // but before calling StartWorker. Nothing else to do here. goto PFS_exit; - } + } - palErr = pSynchManager->WakeUpLocalWorkerThread(pthrCurrent, - SynchWorkerCmdShutdown); + palErr = pSynchManager->WakeUpLocalWorkerThread(SynchWorkerCmdShutdown); if (NO_ERROR != palErr) { ERROR("Failed stopping worker thread [palErr=%u]\n", palErr); @@ -1684,7 +1680,7 @@ namespace CorUnix ERROR("Failed to convert timeout to absolute timeout\n"); s_lInitStatus = SynchMgrStatusError; goto PFS_exit; - } + } // Using the worker thread's predicate/condition/mutex // to wait for worker thread to be done @@ -2040,7 +2036,7 @@ namespace CorUnix // be read). That will allow the worker thread to process // possible commands already successfully written to the // pipe by some other process, before shutting down. - pSynchManager->ShutdownProcessPipe(pthrWorker); + pSynchManager->ShutdownProcessPipe(); // Shutting down: this will cause the worker thread to // fetch residual cmds from the process pipe until an @@ -2959,7 +2955,6 @@ namespace CorUnix process pipe. --*/ PAL_ERROR CPalSynchronizationManager::WakeUpLocalWorkerThread( - CPalThread * pthrCurrent, SynchWorkerCmd swcWorkerCmd) { PAL_ERROR palErr = NO_ERROR; @@ -3407,8 +3402,7 @@ namespace CorUnix { CPalSynchronizationManager * pSynchManager = GetInstance(); - palErr = pSynchManager->WakeUpLocalWorkerThread(pthrCurrent, - SynchWorkerCmdNop); + palErr = pSynchManager->WakeUpLocalWorkerThread(SynchWorkerCmdNop); if (NO_ERROR != palErr) { ERROR("Failed waking up worker thread for process " @@ -3750,8 +3744,7 @@ namespace CorUnix Creates the process pipe for the current process --*/ - bool CPalSynchronizationManager::CreateProcessPipe( - CPalThread * pthrCurrent) + bool CPalSynchronizationManager::CreateProcessPipe() { bool fRet = true; #if HAVE_KQUEUE && !HAVE_BROKEN_FIFO_KEVENT @@ -3892,14 +3885,13 @@ namespace CorUnix Shuts down the process pipe and removes the fifo so that other processes can no longer open it. It also closes the local write end of the pipe (see - comment below). From this moment on the worker thread will process any + comment below). From this moment on the worker thread will process any possible data already received in the pipe (but not yet consumed) and any - data written by processes that still have a opened write end of this pipe; + data written by processes that still have a opened write end of this pipe; it will wait (with timeout) until the last remote process which has a write - end opened closes it, and then it will yield to process shutdown + end opened closes it, and then it will yield to process shutdown. --*/ - PAL_ERROR CPalSynchronizationManager::ShutdownProcessPipe( - CPalThread *pthrCurrent) + PAL_ERROR CPalSynchronizationManager::ShutdownProcessPipe() { PAL_ERROR palErr = NO_ERROR; #ifndef CORECLR @@ -4580,8 +4572,7 @@ namespace CorUnix Carries out all the pending condition signalings for the current thread. --*/ - PAL_ERROR CThreadSynchronizationInfo::RunDeferredThreadConditionSignalings( - CPalThread * pthrCurrent) + PAL_ERROR CThreadSynchronizationInfo::RunDeferredThreadConditionSignalings() { PAL_ERROR palErr = NO_ERROR; diff --git a/src/pal/src/synchmgr/synchmanager.hpp b/src/pal/src/synchmgr/synchmanager.hpp index 0e9fe143ff..5a690e6ca9 100644 --- a/src/pal/src/synchmgr/synchmanager.hpp +++ b/src/pal/src/synchmgr/synchmanager.hpp @@ -587,7 +587,7 @@ namespace CorUnix COwnedObjectsListNodeCache m_cacheOwnedObjectsListNodes; // static methods - static PAL_ERROR Initialize(CPalThread * pthrCurrent); + static PAL_ERROR Initialize(); static DWORD PALAPI WorkerThread(LPVOID pArg); protected: @@ -601,8 +601,7 @@ namespace CorUnix CSynchControllerBase::ControllerType ctCtrlrType); private: - static IPalSynchronizationManager * CreatePalSynchronizationManager( - CPalThread * pthrCurrent); + static IPalSynchronizationManager * CreatePalSynchronizationManager(); static PAL_ERROR StartWorker(CPalThread * pthrCurrent); static PAL_ERROR PrepareForShutdown(void); @@ -637,7 +636,7 @@ namespace CorUnix InternalLeaveCriticalSection(pthrCurrent, &s_csSynchProcessLock); #if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING - pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings(pthrCurrent); + pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings(); #endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING } } @@ -652,14 +651,14 @@ namespace CorUnix InternalLeaveCriticalSection(pthrCurrent, &s_csSynchProcessLock); #if SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING - pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings(pthrCurrent); + pthrCurrent->synchronizationInfo.RunDeferredThreadConditionSignalings(); #endif // SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING && !SYNCHMGR_PIPE_BASED_THREAD_BLOCKING } return lRet; } static LONG GetLocalSynchLockCount(CPalThread * pthrCurrent) { - _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount); + _ASSERTE(0 <= pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount); return pthrCurrent->synchronizationInfo.m_lLocalSynchLockCount; } @@ -962,7 +961,6 @@ namespace CorUnix DWORD * pdwData); PAL_ERROR WakeUpLocalWorkerThread( - CPalThread * pthrCurrent, SynchWorkerCmd swcWorkerCmd); void DiscardAllPendingAPCs( @@ -974,9 +972,9 @@ namespace CorUnix BYTE * pRecvBuf, LONG lBytes); - bool CreateProcessPipe(CPalThread * pthrCurrent); + bool CreateProcessPipe(); - PAL_ERROR ShutdownProcessPipe(CPalThread * pthrCurrent); + PAL_ERROR ShutdownProcessPipe(); public: // diff --git a/src/pal/src/thread/process.cpp b/src/pal/src/thread/process.cpp index 72c422abe7..88a265b0ef 100644 --- a/src/pal/src/thread/process.cpp +++ b/src/pal/src/thread/process.cpp @@ -2313,7 +2313,6 @@ Abstract Initializes (or re-initializes) the saved command line and exe path. Parameter - pThread - the initial thread lpwstrCmdLine lpwstrFullPath @@ -2326,7 +2325,6 @@ Notes PAL_ERROR CorUnix::InitializeProcessCommandLine( - CPalThread *pThread, LPWSTR lpwstrCmdLine, LPWSTR lpwstrFullPath ) diff --git a/src/pal/src/thread/thread.cpp b/src/pal/src/thread/thread.cpp index 352f240ba3..73504a90ef 100644 --- a/src/pal/src/thread/thread.cpp +++ b/src/pal/src/thread/thread.cpp @@ -214,7 +214,7 @@ Abstract: Return: The fresh thread structure, NULL otherwise --*/ -CPalThread* AllocTHREAD(CPalThread *pthr) +CPalThread* AllocTHREAD() { CPalThread* pThread = NULL; @@ -574,7 +574,7 @@ CorUnix::InternalCreateThread( // Create the CPalThread for the thread // - pNewThread = AllocTHREAD(pThread); + pNewThread = AllocTHREAD(); if (NULL == pNewThread) { palError = ERROR_OUTOFMEMORY; @@ -1613,8 +1613,7 @@ CorUnix::CreateThreadData( CPalThread *pThread = NULL; /* Create the thread object */ - /* Passing NULL to AllocTHREAD since there is no thread reference to pass in. */ - pThread = AllocTHREAD(NULL); + pThread = AllocTHREAD(); if (NULL == pThread) { @@ -1830,7 +1829,7 @@ CorUnix::InternalCreateDummyThread( CObjectAttributes oa(NULL, lpThreadAttributes); bool fThreadDataStoredInObject = FALSE; - pDummyThread = AllocTHREAD(pThread); + pDummyThread = AllocTHREAD(); if (NULL == pDummyThread) { palError = ERROR_OUTOFMEMORY; |