linux内核看门狗关闭方法,详解linux 看门狗驱动编写

看门狗是linux驱动的一个重要环节。某些特殊的设备,有时候需要放在一些环境恶劣的地方,比如电信设备。但是,任何软件都不可能100%没有bug。如何保证软件在遇到严重bug、死机的时候也能正常运行呢,那么看门狗就是有效的一种方法。看门狗一般要求用户定时喂狗,如果一段时间没有喂狗的话,那么系统就会自动重启。今天,我们就来看看这个看门狗驱动怎么编写?

1、代码目录

drivers/watchdog

2、阅读目录下的Kconfig,可以找一个s3c模块macro

config HAVE_S3C2410_WATCHDOG

bool

help

This will include watchdog timer support for Samsung SoCs. If

you want to include watchdog support for any machine, kindly

select this in the respective mach-XXXX/Kconfig file.

config S3C2410_WATCHDOG

tristate "S3C2410 Watchdog"

depends on HAVE_S3C2410_WATCHDOG || COMPILE_TEST

select WATCHDOG_CORE

select MFD_SYSCON if ARCH_EXYNOS

help

Watchdog timer block in the Samsung SoCs. This will reboot

the system when the timer expires with the watchdog enabled.

The d

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值