Changeset 3783
- Timestamp:
- Mar 22, 2012, 7:10:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/libc-0.6/src/emx/src/lib/sys/sharedpm.c
r3781 r3783 384 384 if (spmRequestMutexErrno(&RegRec)) 385 385 LIBCLOG_RETURN_P(NULL); 386 /* bird: The following code is broken (bad test). Since it never worked 387 and the fix on trunk involves adding another parameter, I'll just 388 disable the path that will screw up badly and leave the result NULL 389 like most calls already returns. See r2937. */ 390 #if 0 386 391 if (!gpSPMSelf) 387 392 pProcess = gpSPMSelf; … … 403 408 FS_RESTORE(); 404 409 } 410 #else 411 pProcess = gpSPMSelf; 412 #endif 405 413 spmReleaseMutex(&RegRec); 406 414 } … … 629 637 630 638 /** 631 * Wait for a embryo to become a live process and complete 639 * Wait for a embryo to become a live process and complete 632 640 * inheriting (file handles / sockets issues). 633 641 * … … 646 654 DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, &ulStart, sizeof(ulStart)); 647 655 648 /* 656 /* 649 657 * Wait for the process to become ready, 8 ms max. 650 * However, if it becomes alive in that period we know it's a libc 658 * However, if it becomes alive in that period we know it's a libc 651 659 * process and will wait a bit more (130 ms) for it to finishing 652 660 * initialization and inheritance. 653 661 */ 654 for (cLoops = 0; ; cLoops++) 655 { 656 /* 657 * Reset the notification event sem. 662 for (cLoops = 0; ; cLoops++) 663 { 664 /* 665 * Reset the notification event sem. 658 666 */ 659 667 spmRequestMutex(&RegRec); 660 668 fAlive = pEmbryo->enmState > __LIBC_PROCSTATE_ALIVE 661 || ( pEmbryo->pInherit == NULL 669 || ( pEmbryo->pInherit == NULL 662 670 && pEmbryo->pInheritLocked == NULL 663 671 && pEmbryo->enmState == __LIBC_PROCSTATE_ALIVE); … … 668 676 break; /* done */ 669 677 670 /* 671 * Calc the time we should sleep. 678 /* 679 * Calc the time we should sleep. 672 680 */ 673 681 ULONG ulNow = 0; … … 688 696 LIBCLOG_MSG("libc child - wait %lu ms (cLoops=%d rc=%ld)\n", ulSleep, cLoops, rc); 689 697 } 690 else 698 else 691 699 break; /* giving up */ 692 700 693 /* 694 * Recheck before going to sleep on the event sem. 701 /* 702 * Recheck before going to sleep on the event sem. 695 703 */ 696 704 fAlive = pEmbryo->enmState > __LIBC_PROCSTATE_ALIVE 697 || ( pEmbryo->pInherit == NULL 705 || ( pEmbryo->pInherit == NULL 698 706 && pEmbryo->pInheritLocked == NULL 699 707 && pEmbryo->enmState == __LIBC_PROCSTATE_ALIVE); … … 701 709 break; /* done */ 702 710 703 if ( gpSPMHdr->hevNotify 711 if ( gpSPMHdr->hevNotify 704 712 && (rc == NO_ERROR || rc == ERROR_TIMEOUT || rc == ERROR_SEM_TIMEOUT)) 705 713 rc = DosWaitEventSem(gpSPMHdr->hevNotify, ulSleep); … … 2667 2675 *pParent->ppChildNotifyTail = pTerm; 2668 2676 pParent->ppChildNotifyTail = &pTerm->pNext; 2669 2677 2670 2678 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify); 2671 2679 APIRET rc2 = DosPostEventSem(gpSPMHdr->hevNotify); … … 3496 3504 spmFreeProcess(pProcess); 3497 3505 pProcess = pProcessNext; 3498 3506 3499 3507 /* Wake up the embryo waiters (paranoia). */ 3500 3508 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify); … … 3592 3600 spmFreeProcess(pProcess); 3593 3601 pProcess = pProcessNext; 3594 3602 3595 3603 /* Wake up the embryo waiters (paranoia). */ 3596 3604 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify);
Note:
See TracChangeset
for help on using the changeset viewer.