Add MmpTlsFiber

This commit is contained in:
Boring
2023-09-24 20:47:03 +08:00
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -274,7 +274,6 @@ HookRtlUserThreadStart(
VOID NTAPI HookLdrShutdownThread(VOID) {
PLIST_ENTRY entry;
PMMP_TLSP_RECORD record = nullptr;
//
+4 -1
View File
@@ -20,9 +20,10 @@ CRITICAL_SECTION MmpPostponedTlsLock;
DWORD WINAPI MmpReleasePostponedTlsWorker(PVOID) {
DWORD code;
DWORD waitTime = INFINITE;
while (true) {
WaitForSingleObject(MmpPostponedTlsEvent, INFINITE);
WaitForSingleObject(MmpPostponedTlsEvent, waitTime);
EnterCriticalSection(&MmpPostponedTlsLock);
@@ -61,6 +62,8 @@ DWORD WINAPI MmpReleasePostponedTlsWorker(PVOID) {
}
waitTime = MmpPostponedTlsList.empty() ? INFINITE : 1000;
LeaveCriticalSection(&MmpPostponedTlsLock);
}