Changeset 3173 for trunk/src/kmk/w32
- Timestamp:
- Mar 21, 2018, 10:37:41 PM (8 years ago)
- Location:
- trunk/src/kmk/w32
- Files:
-
- 2 edited
-
w32os.c (modified) (2 diffs)
-
winchildren.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/w32/w32os.c
r3156 r3173 187 187 /* Build array of handles to wait for. */ 188 188 dwHandleCount = 1 + process_set_handles (&handles[1]); 189 #else190 /* Add the completed children event as the 2nd one. */191 handles[1] = (HANDLE)MkWinChildGetCompleteEventHandle();192 dwHandleCount = 2;193 #endif194 195 189 dwEvent = WaitForMultipleObjects ( 196 190 dwHandleCount, /* number of objects in array */ … … 198 192 FALSE, /* wait for any object */ 199 193 INFINITE); /* wait until object is signalled */ 194 #else 195 /* Add the completed children event as the 2nd one. */ 196 handles[1] = (HANDLE)MkWinChildGetCompleteEventHandle(); 197 if (handles[1] == NULL) 198 return 0; 199 dwHandleCount = 2; 200 dwEvent = WaitForMultipleObjectsEx (dwHandleCount, 201 handles, 202 FALSE /*bWaitAll*/, 203 256, /* INFINITE - paranoia, only wait 256 ms before checking again. */ 204 TRUE /*bAlertable*/); 205 #endif 200 206 201 207 if (dwEvent == WAIT_FAILED) -
trunk/src/kmk/w32/winchildren.c
r3172 r3173 2536 2536 * that completed children is the typical source of these tokens (esp. for kmk). 2537 2537 * 2538 * @returns Event handle.2538 * @returns Zero if completed children, event handle if waiting is required. 2539 2539 */ 2540 2540 intptr_t MkWinChildGetCompleteEventHandle(void) 2541 2541 { 2542 return (intptr_t)g_hEvtWaitChildren; 2542 /* We don't return the handle if we've got completed children. This 2543 is a safe guard against being called twice in a row without any 2544 MkWinChildWait call inbetween. */ 2545 if (!g_pTailCompletedChildren) 2546 return (intptr_t)g_hEvtWaitChildren; 2547 return 0; 2543 2548 } 2544 2549
Note:
See TracChangeset
for help on using the changeset viewer.
