Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/watchdog/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  watchdog_hrtimer_pretimeout.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/*
 * (c) Copyright 2021 Hewlett Packard Enterprise Development LP.
 */


#include <linux/hrtimer.h>
#include <linux/watchdog.h>

#include "watchdog_core.h"
#include "watchdog_pretimeout.h"

static enum hrtimer_restart watchdog_hrtimer_pretimeout(struct hrtimer *timer)
{
 struct watchdog_core_data *wd_data;

 wd_data = container_of(timer, struct watchdog_core_data, pretimeout_timer);

 watchdog_notify_pretimeout(wd_data->wdd);
 return HRTIMER_NORESTART;
}

void watchdog_hrtimer_pretimeout_init(struct watchdog_device *wdd)
{
 struct watchdog_core_data *wd_data = wdd->wd_data;

 hrtimer_setup(&wd_data->pretimeout_timer, watchdog_hrtimer_pretimeout, CLOCK_MONOTONIC,
        HRTIMER_MODE_REL);
}

void watchdog_hrtimer_pretimeout_start(struct watchdog_device *wdd)
{
 if (!(wdd->info->options & WDIOF_PRETIMEOUT) &&
     !watchdog_pretimeout_invalid(wdd, wdd->pretimeout))
  hrtimer_start(&wdd->wd_data->pretimeout_timer,
         ktime_set(wdd->timeout - wdd->pretimeout, 0),
         HRTIMER_MODE_REL);
 else
  hrtimer_cancel(&wdd->wd_data->pretimeout_timer);
}

void watchdog_hrtimer_pretimeout_stop(struct watchdog_device *wdd)
{
 hrtimer_cancel(&wdd->wd_data->pretimeout_timer);
}

Messung V0.5
C=95 H=97 G=95

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.