Multiple processes may be individually registered with the watchdog, each providing its own timeout time. Each process must update the watchdog within its own timeout interval or the system will reset.

A process may unregister itself at any time.

At least one process must register with the watchdog within 3 minutes of bootup or else the watchdog will reset the system. If ‘/sbin/watchdog &’ is specified in the ‘/etc/rc’ file, it will register itself and keep the watchdog happy indefinitely (until another process registers itself).

Usage

Processes to be protected will register using the ‘WATCHDOG_REGISTER’ IOCTL. The process passed is the desired number of seconds before timeout. The ID (required for watchdog update and deregistration) is passed out.

Update the timer with the ‘WATCHDOG_TICKLE’IOCTL. The ID provided by the registration is passed in.

Before the process exits, it should deregister itself with the

‘WATCHDOG_UNREGISTER’ IOCTL. The ID provided by the registration is passed in.

For example code see Appendix A.

www.amctechcorp.com

27

Page 27
Image 27
AMC 68VZ328 software manual Usage