mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42: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:
parent
08c17094e8
commit
24b07e23d7
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue