Implementing Watchdog functions

I am trying to implement below watchdog functions using syscall.SYS_IOCTL

  1. watchdog enable
  2. watchdog disable
  3. set timeout and pretimeout
  4. get watchdog status
    I am getting problem while setting pretimeout and facing other issues. Is there any another way to implement these watchdog functions?