Changeset 2308
- Timestamp:
- Aug 27, 2005, 6:56:52 PM (20 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/ChangeLog.LIBC
-
Property cvs2svn:cvs-rev
changed from
1.128
to1.129
r2307 r2308 2 2 3 3 TODO: open replace on RAMFS fails with error 32! 4 5 2005-08-27: knut st. osmundsen <bird-gccos2-spam@anduin.net> 6 - libc: 7 o Fixed two cases where the signal semaphore was incorrectly unlocked 8 after signalDeliver(). 4 9 5 10 2005-08-24: knut st. osmundsen <bird-gccos2-spam@anduin.net> -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_signalMask.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r2307 r2308 97 97 * Gain exclusive access to the signal stuff. 98 98 */ 99 int fRelease = 1; 99 100 int rc = __libc_back_signalSemRequest(); 100 101 if (rc) … … 134 135 __SIGSET_AND(&SigSetPending, &SigSetPending, &SigSetNotBlocked); 135 136 if (!__SIGSET_ISEMPTY(&SigSetPending)) 137 { 136 138 __libc_back_signalReschedule(pThrd); 139 fRelease = 0; 140 } 137 141 } 138 142 … … 140 144 * Release semaphore. 141 145 */ 142 __libc_back_signalSemRelease(); 146 if (fRelease) 147 __libc_back_signalSemRelease(); 143 148 144 149 /* -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/signals.c
-
Property cvs2svn:cvs-rev
changed from
1.31
to1.32
r2307 r2308 724 724 * Typically called after a block mask have been updated. 725 725 * 726 * The caller must own the signal semaphore, this function will release the ownership! 727 * 726 728 * @returns On success a flag mask out of the __LIBC_BSRR_* #defines is returned. 727 729 * @returns On failure a negative error code (errno.h) is returned. … … 1841 1843 && !(gafSignalProperties[iSignalNo] & SPP_NORESET)) 1842 1844 { 1845 LIBCLOG_MSG("Performing SA_RESETHAND on %d.\n", iSignalNo); 1843 1846 gaSignalActions[iSignalNo].__sigaction_u.__sa_handler = SIG_DFL; 1844 1847 gaSignalActions[iSignalNo].sa_flags &= ~SA_SIGINFO; … … 1859 1862 __SIGSET_OR(&pThrd->SigSetBlocked, &pThrd->SigSetBlocked, &SigAction.sa_mask); 1860 1863 1864 /* 1865 * Setup ucontext. 1866 */ 1861 1867 void *pvCtx = NULL; 1862 1868 if (SigAction.sa_flags & SA_SIGINFO) … … 1873 1879 || !pThrd->cbSigStack) 1874 1880 { 1881 LIBCLOG_MSG("Calling %p(%d, %p:{.si_signo=%d, .si_errno=%d, .si_code=%#x, .si_timestamp=%#x, .si_flags=%#x .si_pid=%#x, .si_pgrp=%#x, .si_tid=%#x, .si_uid=%d, .si_status=%d, .si_addr=%p, .si_value=%p, .si_band=%ld, .si_fd=%d}, %p)\n", 1882 (void *)SigAction.__sigaction_u.__sa_sigaction, iSignalNo, (void *)&SigInfo, SigInfo.si_signo, SigInfo.si_errno, 1883 SigInfo.si_code, SigInfo.si_timestamp, SigInfo.si_flags, SigInfo.si_pid, SigInfo.si_pgrp, SigInfo.si_tid, 1884 SigInfo.si_uid, SigInfo.si_status, SigInfo.si_addr, SigInfo.si_value.sigval_ptr, SigInfo.si_band, SigInfo.si_fd, pvCtx); 1875 1885 __libc_back_signalSemRelease(); 1876 1886 SigAction.__sigaction_u.__sa_sigaction(iSignalNo, &SigInfo, pvCtx); … … 1902 1912 pTib->tib_pstack = pThrd->pvSigStack; 1903 1913 pTib->tib_pstacklimit = (char *)pThrd->pvSigStack + pThrd->cbSigStack; 1914 1915 LIBCLOG_MSG("Calling %p(%d, %p:{.si_signo=%d, .si_errno=%d, .si_code=%#x, .si_timestamp=%#x, .si_flags=%#x .si_pid=%#x, .si_pgrp=%#x, .si_tid=%#x, .si_uid=%d, .si_status=%d, .si_addr=%p, .si_value=%p, .si_band=%ld, .si_fd=%d}, %p) on stack %p-%p (old stack %p-%p)\n", 1916 (void *)SigAction.__sigaction_u.__sa_sigaction, iSignalNo, (void *)&SigInfo, SigInfo.si_signo, SigInfo.si_errno, 1917 SigInfo.si_code, SigInfo.si_timestamp, SigInfo.si_flags, SigInfo.si_pid, SigInfo.si_pgrp, SigInfo.si_tid, 1918 SigInfo.si_uid, SigInfo.si_status, SigInfo.si_addr, SigInfo.si_value.sigval_ptr, SigInfo.si_band, SigInfo.si_fd, 1919 pvCtx, pTib->tib_pstack, pTib->tib_pstacklimit, pvOldStack, pvOldStackLimit); 1904 1920 1905 1921 /* release, switch and call. */ … … 1946 1962 /* 1947 1963 * Re-take the signal semaphore and restore the signal mask. 1948 * We'll have to reschedule signals here unless the two masks are 100% equal 1964 * We'll have to reschedule signals here unless the two masks are 100% equal. 1949 1965 */ 1950 1966 if (__libc_back_signalSemRequest()) 1951 break;1967 LIBCLOG_ERROR_RETURN_INT(rcRet); 1952 1968 pThrd->SigSetBlocked = SigSetOld; 1953 1969 signalScheduleSPM(pThrd); … … 2308 2324 signalDeliver(pThrd, 0, NULL); 2309 2325 2310 __libc_back_signalSemRelease();2311 2326 if (!rc) 2312 2327 LIBCLOG_RETURN_INT(rc); … … 2441 2456 2442 2457 /* 2443 * Deliver signals .2458 * Deliver signals and release the semaphore. 2444 2459 */ 2445 2460 signalDeliver(pThrd, 0, NULL); … … 2499 2514 { 2500 2515 /* 2501 * Clear the indicator and deliver signals .2516 * Clear the indicator and deliver signals (releaseing the semaphore). 2502 2517 */ 2503 2518 __atomic_xchg(&pThrd->fSigBeingPoked, 0); … … 2515 2530 } 2516 2531 else 2517 LIBC_ASSERTM_FAILED("No thread structure! This is really impossible!\n");2532 LIBC_ASSERTM_FAILED("No thread structure! This is really quite impossible!\n"); 2518 2533 2519 2534 return -EINVAL; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.