1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bugzilla 282943. Don't use PulseEvent; Microsoft says it's unreliable. Someone looking at the code at Freescale saw its use in the code and raised a flag. This change is proactive; no problematic behavior was actually observed. See http://msdn.microsoft.com/en-us/library/ms684914(VS.85).aspx

This commit is contained in:
John Cortell 2009-07-09 19:30:28 +00:00
parent 08c17094e8
commit 24b07e23d7

View file

@ -221,7 +221,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
swprintf(eventTerminateName, L"SATerm%p", pCurProcInfo); swprintf(eventTerminateName, L"SATerm%p", pCurProcInfo);
swprintf(eventKillName, L"SAKill%p", pCurProcInfo); swprintf(eventKillName, L"SAKill%p", pCurProcInfo);
pCurProcInfo->eventBreak = CreateEventW(NULL, TRUE, FALSE, eventBreakName); pCurProcInfo->eventBreak = CreateEventW(NULL, FALSE, FALSE, eventBreakName);
pCurProcInfo->eventWait = CreateEventW(NULL, TRUE, FALSE, eventWaitName); pCurProcInfo->eventWait = CreateEventW(NULL, TRUE, FALSE, eventWaitName);
pCurProcInfo->eventTerminate = CreateEventW(NULL, FALSE, FALSE, eventTerminateName); pCurProcInfo->eventTerminate = CreateEventW(NULL, FALSE, FALSE, eventTerminateName);
pCurProcInfo->eventKill = CreateEventW(NULL, FALSE, FALSE, eventKillName); pCurProcInfo->eventKill = CreateEventW(NULL, FALSE, FALSE, eventKillName);
@ -696,7 +696,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_raise
break; break;
case SIG_INT: case SIG_INT:
ResetEvent(pCurProcInfo -> eventWait); ResetEvent(pCurProcInfo -> eventWait);
PulseEvent(pCurProcInfo -> eventBreak); SetEvent(pCurProcInfo -> eventBreak);
ret = (WaitForSingleObject(pCurProcInfo -> eventWait, 100) == WAIT_OBJECT_0); ret = (WaitForSingleObject(pCurProcInfo -> eventWait, 100) == WAIT_OBJECT_0);
break; break;
default: default: