[Feature Request] Timers and pended functions should be separated

未关闭
#593 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
c

调研方向

The payload names no files or functions, only the software timer module, the timer service (daemon) task and the pended-function mechanism. Start by finding how the kernel's timer service task dispatches pended functions, then decide whether they can get their own task. Done would need a design agreed with maintainers first, since the author's implementation was never posted as a pull request.

由索引模型根据 Issue 内容生成。

描述

enhancement

Is your feature request related to a problem? Please describe.
Currently, the software timers also include the functionality of "pended functions". This is useful if one wants to defer the execution of lengthy or less important functions to the daemon task, i.e. the timer service task. While the functionality of these "pended functions" is very useful, having it combined with the timer service task has a couple drawbacks:

  • if one wants to use the pended functions, the timer module must be included as well. Decoupling of these two functionalitites, which are in fact two completely different things, would be great.
  • if software timers and pended functions are used at the same time, this can lead to problems if one of the pended function takes longer than the time required until the next timer is ready. Assume the following scenario: a software timer is configured that should fire in 2 ms. Further, a pended function is installed, whose execution would take 3 ms. In that case, the timer would be delayed. It would make sense to have a task whose priority is just above the idle task, and then defer lengthy operations to this task using the pended functions. The timer task then would have a priority that is higher than this, such that it will not be interrupted by long operations.

Describe the solution you'd like
There should be two separate tasks for the pended functions and the timers such that one can use either one alone, or both.
I have implemented this already and will post a PR if this is considered useful.

Describe alternatives you've considered
Use pended functions from the timer module.

How many devices will this feature impact?
N/A

What are your project timelines?
N/A

Additional context
none

If you have the same (or similar) feature request, please upvote this issue with thumbs up 👍
and use the comments section to provide answers to the questions above.

主要语言
C
星标
4.6k
派生
1.6k
平均合并
2 天 22 小时
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FreeRTOS/FreeRTOS-Kernel 的其他 Issue

查看 FreeRTOS/FreeRTOS-Kernel 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。