Commit Graph

21 Commits

Author SHA1 Message Date
Alin Jerpelea eb9030c891 sched: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-12 01:10:14 +08:00
ouyangxiangzhen 3b111c8b99 sched/wdog: Refactor wdog module
This commit refactors the wdog module to use absolute time representation internally. The main improvements include:
1. Fixed recursive watchdog handling caused by calling wd_start within watchdog timeout callback function.
2. Simplified timer processing to improve performance and enhance code readability.
3. Improved accuracy of timers.
4. Reduced critical section and interrupt disable time, improving real-time performance.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-10 23:32:30 +08:00
ligd 7dabc6ff2f sched/wdog: Change sq to list
Before wdog module refactoring, we change the sq to double linked list.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-10 23:32:30 +08:00
ligd 16df0dba4d wdog: wd_gettime() return 0 when wdog has already expired
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-10 23:32:30 +08:00
Xiang Xiao 5b0b4bd586 sched/wdog: Change the return type of wd_gettime from int to sclock_t
to handle 64bits sclock_t correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-19 23:21:54 +03:00
Xiang Xiao a0ce81d659 sched/wdog: Don't dynamically allocate wdog_s
to save the preserved space(1KB) and also avoid the heap overhead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
2020-08-11 12:28:55 -06:00
Gregory Nutt c21d198ac5 sched/wdog: Update to Apache 2.0 Headers
And run each .c and .h file through nxstyle to assure compliance.
2020-03-11 18:35:18 -03:00
ligd 441cf6c207 sched/wdog: improve accuracy of wd_gettime() in tickless mode 2018-11-09 09:26:34 -06:00
Gregory Nutt b54ffe858a Standardization of some function headers. 2018-03-13 09:52:27 -06:00
Gregory Nutt 7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt 12a4a58aa6 Update some wdog-related comments 2017-02-24 10:58:37 -06:00
Gregory Nutt 18ce4ff57b sched/: Review and correct some stylistic inconsistencies 2016-08-07 08:25:30 -06:00
Gregory Nutt 6e3107650d nuttx/sched: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 08:17:46 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt ea7dbc984b Add basic sporadic schedule state machine 2015-07-24 09:03:21 -06:00
Gregory Nutt b4423c1eed Make some file section headers more consistent with standard 2015-04-08 06:47:36 -06:00
Gregory Nutt fd484c4de9 Add support for statically allocated watchdog timer structures 2014-08-22 08:46:34 -06:00
Gregory Nutt ad9b3f8ab8 wdog.h does not contain any application interface, only internal OS interface. Further, it is non-standard. Move wdog.h from include/ to include/nuttx. For the same reason, move the description of the watchdog timer interfaces from the Users Guide to the Porting Guide. 2014-08-21 11:16:55 -06:00
Gregory Nutt 952d87587f If we run out of pre-allocated watchdog times, the logic will allocate additional timers from the heap. A reserve of pre-allocated watchdog timers is maintained so that there will always be timers available for interrupt handlers. 2014-08-21 08:44:29 -06:00
Gregory Nutt e1769b22f1 Remove os_internal.h it has been replace by several new header files under sched/. There have been some sneak inclusion paths via os_internal.h, so expect a few compilation errors for some architectures 2014-08-08 18:39:28 -06:00
Gregory Nutt 0f318e9249 Move watchdog functions from sched/ to sched/wdog 2014-08-08 14:21:48 -06:00