Illegal use of wdog timers in FTPC

Open
#360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start with netutils/ftpc/ftpc_connect.c and trace its uses of wd_start(), wd_cancel(), and related watchdog functions. Check the POSIX timer interface and the PROTECTED and KERNEL build constraints; done means the FTPC connection timing no longer calls internal OS watchdog APIs or relies on timer-interrupt callbacks accessing user space.

Written by the indexing model from the issue text.

Description

netutils/ftpc/ftpc_connect.c uses internal OS wdog timer functions wd_start(), wd_cancel(), etc. This is aviolation of the portable POSIX OS interface. wd_start(0 is not an application accessible interface. It is only for use inside the OS.

The wdog interface functions cannot be called in PROTECTED or KERNEL build modes nor can they do the interrupt handling logic access user space. Remember that the callback is in the context of the timer interrupt handler.

The use of the internal OS wdog function should be replaced with user POSIX timer interface functions.

Dominant language
C
Stars
465
Forks
782
Avg merge
3d 11h
Merged PRs (30d)
44

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/nuttx-apps

All issues in apache/nuttx-apps

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.