Changeset 3796
- Timestamp:
- May 24, 2012, 10:06:49 PM (13 years ago)
- Location:
- trunk/libc
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/include
- Property svn:mergeinfo changed
/branches/libc-0.6/src/emx/include merged: 3795
- Property svn:mergeinfo changed
-
trunk/libc/include/InnoTekLIBC/fork.h
r2806 r3796 412 412 * This is only set when fork() is called from threads other than 1. */ 413 413 int fStackAlloc; 414 /** Pointer to the instruction star intthe return sequence for __fork().414 /** Pointer to the instruction starting the return sequence for __fork(). 415 415 * Pratically speaking, set esp=pvStackRet and jump here. */ 416 416 void *pvForkRet; -
trunk/libc/src/kNIX/os2
- Property svn:mergeinfo changed
/branches/libc-0.6/src/emx/src/lib/sys merged: 3795
- Property svn:mergeinfo changed
-
trunk/libc/src/kNIX/os2/libcfork.c
r3050 r3796 487 487 /* 488 488 * Don't deregister modules which has already been deregistered. 489 * Don't deregister if we're in shutting down the process (waste 489 * Don't deregister if we're in shutting down the process (waste 490 490 * of time and SPM will already be shut down). 491 491 */ … … 615 615 616 616 /* 617 * Determin fxsave/fxrstor support.617 * Determine fxsave/fxrstor support. 618 618 */ 619 619 static int fHaveFXSR = -1; … … 762 762 /* 763 763 * Check if we have an executable in the module list. 764 * It's impossible to pull of a fork without the executable being ready for it!764 * It's impossible to pull off a fork without the executable being ready for it! 765 765 */ 766 766 if (forkParCanFork(pModules)) … … 1022 1022 * will go directly into wait on the mutex. I.e. the event sems are only used 1023 1023 * for accessing the mutex, and the mutex is the semaphore to wait on. This is 1024 * much more reliable than sleeping on event sems, since mutex sems get s1025 * invalidate if an owner dies.1024 * much more reliable than sleeping on event sems, since mutex sems get 1025 * invalidated if an owner dies. 1026 1026 * 1027 1027 * The handle is created with buffer flushing disabled. … … 1196 1196 * child run. 1197 1197 * 1198 * The for buffer will be released before DosExecPgm() so the child can1198 * The fork buffer will be released before DosExecPgm() so the child can 1199 1199 * do init time processing of the DosEx stuff for instance. After DosExecPgm() 1200 1200 * we'll be wait on the event semaphore and subseqently on the mutex till … … 2452 2452 2453 2453 /* 2454 * Res t the buffer.2454 * Reset the buffer. 2455 2455 */ 2456 2456 if (rc >= 0) -
trunk/libc/src/kNIX/os2/sharedpm.c
r3782 r3796 464 464 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify); 465 465 APIRET rc2 = DosPostEventSem(gpSPMHdr->hevNotify); 466 spmReleaseMutex(&RegRec); 466 spmReleaseMutex(&RegRec); 467 467 LIBC_ASSERTM(!rc2 || rc2 == ERROR_ALREADY_POSTED, "rc2=%ld!\n", rc2); rc2 = rc2; 468 468 } … … 600 600 601 601 /** 602 * Wait for a embryo to become a live process and complete 602 * Wait for a embryo to become a live process and complete 603 603 * inheriting (file handles / sockets issues). 604 604 * … … 617 617 DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, &ulStart, sizeof(ulStart)); 618 618 619 /* 619 /* 620 620 * Wait for the process to become ready, 8 ms max. 621 * However, if it becomes alive in that period we know it's a libc 621 * However, if it becomes alive in that period we know it's a libc 622 622 * process and will wait a bit more (130 ms) for it to finishing 623 623 * initialization and inheritance. 624 624 */ 625 for (cLoops = 0; ; cLoops++) 626 { 627 /* 628 * Reset the notification event sem. 625 for (cLoops = 0; ; cLoops++) 626 { 627 /* 628 * Reset the notification event sem. 629 629 */ 630 630 spmRequestMutex(&RegRec); 631 631 fAlive = pEmbryo->enmState > __LIBC_PROCSTATE_ALIVE 632 || ( pEmbryo->pInherit == NULL 632 || ( pEmbryo->pInherit == NULL 633 633 && pEmbryo->pInheritLocked == NULL 634 634 && pEmbryo->enmState == __LIBC_PROCSTATE_ALIVE); … … 639 639 break; /* done */ 640 640 641 /* 642 * Calc the time we should sleep. 641 /* 642 * Calc the time we should sleep. 643 643 */ 644 644 ULONG ulNow = 0; … … 659 659 LIBCLOG_MSG("libc child - wait %lu ms (cLoops=%d rc=%ld)\n", ulSleep, cLoops, rc); 660 660 } 661 else 661 else 662 662 break; /* giving up */ 663 663 664 /* 665 * Recheck before going to sleep on the event sem. 664 /* 665 * Recheck before going to sleep on the event sem. 666 666 */ 667 667 fAlive = pEmbryo->enmState > __LIBC_PROCSTATE_ALIVE 668 || ( pEmbryo->pInherit == NULL 668 || ( pEmbryo->pInherit == NULL 669 669 && pEmbryo->pInheritLocked == NULL 670 670 && pEmbryo->enmState == __LIBC_PROCSTATE_ALIVE); … … 672 672 break; /* done */ 673 673 674 if ( gpSPMHdr->hevNotify 674 if ( gpSPMHdr->hevNotify 675 675 && (rc == NO_ERROR || rc == ERROR_TIMEOUT || rc == ERROR_SEM_TIMEOUT)) 676 676 rc = DosWaitEventSem(gpSPMHdr->hevNotify, ulSleep); … … 2633 2633 *pParent->ppChildNotifyTail = pTerm; 2634 2634 pParent->ppChildNotifyTail = &pTerm->pNext; 2635 2635 2636 2636 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify); 2637 2637 APIRET rc2 = DosPostEventSem(gpSPMHdr->hevNotify); … … 3462 3462 spmFreeProcess(pProcess); 3463 3463 pProcess = pProcessNext; 3464 3464 3465 3465 /* Wake up the embryo waiters (paranoia). */ 3466 3466 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify); … … 3558 3558 spmFreeProcess(pProcess); 3559 3559 pProcess = pProcessNext; 3560 3560 3561 3561 /* Wake up the embryo waiters (paranoia). */ 3562 3562 LIBCLOG_MSG("posting %#lx\n", gpSPMHdr->hevNotify); -
trunk/libc/src/kNIX/os2/signals.c
r2942 r3796 848 848 849 849 /* 850 * Can't be to careful!850 * Can't be too careful! 851 851 */ 852 852 LIBC_ASSERTM(!__libc_back_signalSemIsOwner(), "Thread owns the signal semaphore!!! Bad boy!!\n");
Note:
See TracChangeset
for help on using the changeset viewer.