Commit Graph

17 Commits

Author SHA1 Message Date
ligd 9116ed9247 sched/wdog: fix switch_context caused error in wd_start()
Thead A:                     Thread B:
wd_start(wdogX)
wd_cancel
nxsched_cancel_timer  -->    wd_start(wdogX)
                             wd_cancel
                             add wdogX to g_wdactivelist
                      <--
add wdogX to g_wdactivelist

then, you will find wdogX add twice.

Change-Id: Icbf3b2badff20908e115c9134e2400cdcb32b1e0
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-08-27 16:59:20 +09: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
Xiang Xiao 517974787f Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -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
Gregory Nutt bb623d1e04 This commit renames all internal OS functions defined under sched/task so that they begin with the prefix. For example, nxtask_exit() vs. task_exit().
Squashed commit of the following:

    Trivial, cosmetic
    sched/, arch/, and include:  Rename task_vforkstart() as nxtask_vforkstart()
    sched/, arch/, and include:  Rename task_vforkabort() as nxtask_vforkabort()
    sched/, arch/, and include:  Rename task_vforksetup() as nxtask_vfork_setup()
    sched/:  Rename notify_cancellation() as nxnotify_cancellation()
    sched/:  Rename task_recover() to nxtask_recover()
    sched/task, sched/pthread/, Documentation/:  Rename task_argsetup() and task_terminate() to nxtask_argsetup() and nxtask_terminate(), respectively.
    sched/task:  Rename task_schedsetup() to nxtask_schedsetup()
    sched/ (plus some binfmt/, include/, and arch/):  Rename task_start() and task_starthook() to nxtask_start() and nxtask_starthook().
    arch/ and sched/:  Rename task_exit() and task_exithook() to nxtask_exit() and nxtask_exithook(), respectively.
    sched/task:  Rename all internal, static, functions to begin with the nx prefix.
2019-02-04 13:42:51 -06: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 0de294a586 Fix lots of occurrences of 'the the', 'the there', 'the these', 'the then', 'the they. 2017-05-11 13:35:56 -06:00
Gregory Nutt 970b34ae8f Remove some empty file section section header comments 2016-02-17 17:17:44 -06:00
Gregory Nutt 0f90500f72 Standardize the width of all comment boxes in header files 2015-10-02 17:48:24 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt b3a1939020 Sempahores: Add logic to clean up after task_delete() or pthread_cancel() if the task happens to be waiting on a semaphore when it is cancelled 2014-12-13 12:02:25 -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 0f318e9249 Move watchdog functions from sched/ to sched/wdog 2014-08-08 14:21:48 -06:00