Xiang Xiao
acca9fcc3b
sched/wdog: Remove MAX_WDOGPARMS and related stuff
...
since the variable arguments are error prone and seldom used.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-14 08:19:50 -06: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
f618de9c97
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-08 17:30:26 -03:00
Xiang Xiao
4c706771c3
sched/wdog: Replace all callback argument from uint32_t to wdparm_t
...
and alwasy cast the argument of wd_start to wdparm_t
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-08 17:30:26 -03: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
f92dba212d
sched/sched/sched.h: Make naming of all internal names consistent:
...
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 16:58:42 -03:00
Gregory Nutt
f2e6e131d4
include/nuttx/wdog.h: Add some additional comments.
2020-04-07 17:40:46 +01: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
Xiang Xiao
6a3c2aded6
Fix wait loop and void cast ( #24 )
...
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt
b5111d2c38
tools/nxstyle.c: Add logic to detect if there is a blank line following the final right brace. sched/: Applied the modified nxstyle to all C file as a test.
2019-10-24 11:02:42 -06:00
Gregory Nutt
bcb4409756
sched/wdog/wd_start.c: Back out a kludge-workaround for an SDCC compiler problem fix back in Feb 2017 by commit b8f3bd857b
. That workaround now appears to conflict with newer GCC versions using unsupport warning options.
2019-10-04 09:10:15 -06:00
Gregory Nutt
f6b9fe5b14
tools/nxstyle.c: Add logic to detect a blank line following a left brace or a blank line preceding a right brace.
2019-03-10 09:53:33 -06:00
ligd
441cf6c207
sched/wdog: improve accuracy of wd_gettime() in tickless mode
2018-11-09 09:26:34 -06:00
Gregory Nutt
8e203e09d4
Costmetic changes
2018-08-19 11:19:43 -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
da50646bcf
sched/wdog: wd_start() is an internal OS function and should not set the errno value. Reviewed and updated every call to wd_start() to verify if return value is used and if so if the errno value is accessed.
2018-01-31 10:09:14 -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
12a4a58aa6
Update some wdog-related comments
2017-02-24 10:58:37 -06:00
Gregory Nutt
69e9f8638d
Most interrupt handling logic interacts with tasks via standard mechanism such as sem_post, sigqueue, mq_send, etc. This all call enter_critical_section and are assumed to be safe in the SMP case.
...
But certain logic interacts with tasks in different ways. The only one that comes to mind are wdogs. There is a tasking interface that to manipulate wdogs, and a different interface in the timer interrupt handling logic to manage wdog expirations.
In the normal case, this is fine. Since the tasking level code calls enter_critical_section, interrupts are disabled an no conflicts can occur. But that may not be the case in the SMP case. Most architectures do not permit disabling interrupts on other CPUs so enter_critical_section must work differently: Locks are required to protect code.
So this change adds locking (via enter_critical section) to wdog expiration logic for the the case if the SMP configuration.
2016-11-18 13:57:30 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
970b34ae8f
Remove some empty file section section header comments
2016-02-17 17:17:44 -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
Dimitry Kloper
b48ca00cd5
The delay parameter has 'int' type while explicit int32_t is used in sigtimedwait() (sig_timedwait.c) This can lead to wrong argument for systems that have default int size different than int32 (namely AVR).
2016-01-05 07:58:04 -06:00
Gregory Nutt
79d554939e
sched/: Fix some spacing issues
2015-10-07 19:59:14 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Gregory Nutt
3adcae8ffb
Update the type passed to watchdog timer handlers. Using uint32_t is a problem for 64-bit machines.
2015-05-18 08:53:42 -06:00
Gregory Nutt
1aa528a572
More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs.
2014-11-25 14:10:35 -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
2bc07a03ae
Correct release notes, updat changelog, fix some conditional compilation
2014-08-15 06:56:42 -06:00
Gregory Nutt
649ef76f71
Timers: In Tickless mode, need to stop the interval timer before inserted a new delay into the timer list. Otherwise, the time is incorrect on the first entry of the list
2014-08-11 08:25:25 -06:00
Gregory Nutt
6bd52bce06
Tickless OS: Correct a bug: logic to detect changes in head of timer list was wrong.
2014-08-10 13:12:18 -06:00
Gregory Nutt
d798dd37a7
Replace os_internal.h with sched/sched.h in files that actually reference something in sched.h
2014-08-08 17:53:55 -06:00
Gregory Nutt
0f318e9249
Move watchdog functions from sched/ to sched/wdog
2014-08-08 14:21:48 -06:00