Esempio n. 1
0
File: Timer.c Progetto: 23Skidoo/ghc
void
startTimer(void)
{
    if (atomic_dec(&timer_disabled) == 0) {
        if (RtsFlags.MiscFlags.tickInterval != 0) {
            startTicker();
        }
    }
}
Esempio n. 2
0
void
startTimer(void)
{
#ifndef house_HOST_OS
    if (RtsFlags.MiscFlags.tickInterval != 0) {
        startTicker();
    }
#endif
}
Esempio n. 3
0
/* There may be at most one additional tick fired after a call to this */
void
exitTicker (bool wait)
{
    ASSERT(!exited);
    exited = 1;
    // ensure that ticker wakes up if stopped
    startTicker();

    // wait for ticker to terminate if necessary
    if (wait) {
        if (pthread_join(thread, NULL)) {
            sysErrorBelch("Itimer: Failed to join");
        }
    } else {
        pthread_detach(thread);
    }
}