VirtualBox

Changeset 9932 in vbox


Ignore:
Timestamp:
Jun 25, 2008 3:36:13 PM (17 years ago)
Author:
vboxsync
Message:

r=bird: (todo) Must dedicate a thread for taking the signals, we cannot have them being delivered to just any thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/timer-posix.cpp

    r9839 r9932  
    7575    /** Flag indicating that the timer has been destroyed. */
    7676    uint8_t volatile        fDestroyed;
    77 #ifndef IPRT_WITH_POSIX_TIMERS
     77#ifndef IPRT_WITH_POSIX_TIMERS /** @todo We have to take the signals on a dedicated timer thread as
     78                                * we (might) have code assuming that signals doesn't screw around
     79                                * on existing threads. (It would be sufficient to have one thread
     80                                * per signal of course since the signal will be masked while it's
     81                                * running, however, it may just cause more compilcations than its
     82                                * worth - sigwait/sigwaitinfo work atomically anyway...)
     83                                * Also, must block the signal in the thread main procedure too. */
    7884    /** The timer thread. */
    7985    RTTHREAD                Thread;
     
    309315        return VERR_NOT_SUPPORTED;
    310316
    311 #ifndef IPRT_WITH_POSIX_TIMERS
     317#ifndef IPRT_WITH_POSIX_TIMERS /** @todo the signal blocking applies to the new code too, see comment in the struct. */
    312318    /*
    313319     * Check if timer is busy.
     
    460466        if (RT_SUCCESS(rc))
    461467        {
    462    
     468
    463469            /* Ask to deliver RT_TIMER_SIGNAL upon timer expiration. */
    464470            evt.sigev_notify = SIGEV_SIGNAL;
    465471            evt.sigev_signo  = RT_TIMER_SIGNAL;
    466472            evt.sigev_value.sival_ptr = pTimer; /* sigev_value gets copied to siginfo. */
    467    
     473
    468474            rc = RTErrConvertFromErrno(timer_create(CLOCK_REALTIME, &evt, &pTimer->timer));
    469475            if (RT_SUCCESS(rc))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette