Changeset 1621


Ignore:
Timestamp:
Nov 7, 2004, 5:07:49 PM (21 years ago)
Author:
bird
Message:

Debugging signals.

Location:
trunk/src/emx/src/lib/sys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/sys/b_signalMask.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1620 r1621  
    7474    sigset_t        SigSetNew;
    7575    sigset_t        SigSetOld;
    76     sigset_t        SigSet;
    7776
    7877    /*
     
    130129
    131130        /*
    132          * Check if we've unblocked anything and thus made it possible for
    133          * pending signals to be delivered.
     131         * Check if there are any pending signals with the new mask.
    134132         */
    135         SigSetNew = pThrd->SigSetBlocked;
    136         __SIGSET_AND(&SigSet, &SigSetOld, &SigSetNew);
    137         if (!__SIGSET_ISEMPTY(&SigSetNew))
    138         {
    139             sigset_t    SigSetPending;
    140             __SIGSET_OR(&SigSetPending, &pThrd->SigSetPending, &__libc_gSignalPending);
    141             __SIGSET_AND(&SigSetPending, &SigSetPending, &SigSetNew);
    142             if (!__SIGSET_ISEMPTY(&SigSetPending))
    143                 __libc_back_signalPokeThread(pThrd);
    144         }
     133        sigset_t    SigSetNotBlocked = pThrd->SigSetBlocked;
     134        __SIGSET_NOT(&SigSetNotBlocked);
     135        sigset_t    SigSetPending;
     136        __SIGSET_OR(&SigSetPending, &pThrd->SigSetPending, &__libc_gSignalPending);
     137        __SIGSET_AND(&SigSetPending, &SigSetPending, &SigSetNotBlocked);
     138        if (!__SIGSET_ISEMPTY(&SigSetPending))
     139            __libc_back_signalReschedule(pThrd);
    145140    }
    146141
  • trunk/src/emx/src/lib/sys/signals.c

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r1620 r1621  
    830830
    831831/**
     832 * Reschedule signals.
     833 * Typically called after a block mask have been updated.
     834 *
     835 * @returns On success a flag mask out of the __LIBC_BSRR_* #defines is returned.
     836 * @returns On failure a negative error code (errno.h) is returned.
     837 * @param   pThrd       Current thread.
     838 */
     839int __libc_back_signalReschedule(__LIBC_PTHREAD pThrd)
     840{
     841    LIBC_ASSERT(__libc_back_signalSemIsOwner());
     842    signalScheduleSPM(pThrd);
     843    signalScheduleProcess(pThrd);
     844    return signalDeliver(pThrd, 0, NULL);
     845}
     846
     847
     848/**
    832849 * Raises a signal in the current process.
    833850 *
  • trunk/src/emx/src/lib/sys/signals.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1620 r1621  
    4848void        __libc_back_signalPokeThread(__LIBC_PTHREAD pThrd);
    4949void        __libc_back_signalPokeProcess(void);
     50int         __libc_back_signalReschedule(__LIBC_PTHREAD pThrd);
    5051int         __libc_back_signalSuspend(void);
    5152int         __libc_back_signalAccept(__LIBC_PTHREAD pThrd, int iSignalNo, sigset_t *pSigSet, siginfo_t *pSigInfo);
Note: See TracChangeset for help on using the changeset viewer.