Hung-watchdog

static int watchdog(void *dummy)
{
    unsigned long hung_last_checked = jiffies;

    set_user_nice(current, 0);

    for ( ; ; )
    {
            unsigned long timeout = sysctl_hung_task_timeout_secs;
            unsigned long interval = sysctl_hung_task_check_interval_secs;

            interval = min_t(unsigned long, interval, timeout);
            t = hung_timeout_jiffies(hung_last_checked, interval);
            if (t <= 0)
            {
                   if (!atomic_xchg(&reset_hung_task, 0) &&!hung_detector_suspended)
                           check_hung_uninterruptible_tasks(timeout);
                  hung_last_checked = jiffies;
                   continue;
            }
            schedule_timeout_interruptible(t);
    }

    return 0;
}

上一篇:mini2440 关闭看门狗方式


下一篇:Error in v-on handler: “TypeError: this.$confirm is not a function“