Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Make PR-1565 link to the PR page.

...

  • The wdog timer call backs used to support a variable number of arguments.  Now they support only a single argument (PR #1565).  This eliminates (1) the configuration option CONFIG_MAX_WDOGPARMS and the OS interfaces wd_create() and wd_delete()
  • wdog timer data structures are no longer pre-allocated.  Now they are allocated by the caller of wd_start().  This (1) eliminates the configuration options CONFIG_PREALLOC_WDOGS and CONFIG_WDOG_INTRESERVE, (2) eliminates the type WDOG_ID which was a pointer type to struct wdog_s, and (3) change the type of the first argument of all remaining wdog interfaces functions from WDOG_ID to FAR struct wdog_s *.

...

  • Most drivers have a field in structure like WDOG_ID wdog;  That must be changed to struct wdog_s wdog;  That changes the field from a pointer to a struct wdog_s to the struct wdog_s storage itself.
  • Eliminate all calls to wd_create().   The WDOG_ID is not longer managed by the timing subsystem and the wd_create() interface has been removed.
  • The wd_delete() interface has also been removed, but more care will need to be exercised:  wd_delete() also cancels any running timer so, in many case, calls to wd_delete() should be replaced with calls to wd_cancel().  If you are certain that the timer has never been started, then you must remove the call to wd_delete() altogether.  Calling wd_cancel() with an un-initialized struct wdog_s instance may well cause a fatal crash.
  • Replace the first parameter of all remaining wdog function calls from.  For example, replace a call like ret = wd_cancel(priv→wdogpriv->wdog) where priv→wdog priv->wdog was type WDOG_ID with the call ret = wd_cancel(&priv→wdogpriv->wdog)where priv→wdog priv->wdog is now type struct wdog_s.

...