Commit Graph

42 Commits

Author SHA1 Message Date
Ouss4 f8801e1bd8 libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a
warning with struct initialization.
2020-02-19 18:02:25 -06:00
Gregory Nutt 2ec59121fb Fix non C89 noncompliant code that was causing the ZDS-II compile to fail. 2020-02-19 23:09:10 +01:00
Gregory Nutt 6309165fe0 tools/nxstyle.c: Add automatic detection of line width based on examining
the width of all block comments. Includes a check to assure that all block
comments use the same line width.

Verified against all .c files under /sched.  There were a few cosmetic changes to the coding style under /sched to account to new, correctly detected problems in the /sched files.
2020-01-12 13:07:54 -03:00
Masayuki Ishikawa 3f37dddea7 sched: timer: Fix inappropriate cast in timer_settime() 2020-01-08 09:06:55 -06: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
liuhaitao 9b75ef06ea include/sys/time.h, libs/libc/unistd, sched/timer: Implement alarm(), setitimer() and getitimer() APIs. 2019-11-13 08:10:16 -06:00
Gregory Nutt 53d5e44d89 Cosmetic updates. 2019-08-28 15:14:27 -06:00
Xiang Xiao fb63c0a293 sched/signal and related changes to other OS subsystems. 2019-01-27 09:28:59 -06:00
Xiang Xiao a9ff43d93c fs/aio, libs/libc/aio, sched/mqueue, sched/timer, and sched/signal: Remove the code duplication for SIGEV_THREAD. 2018-11-08 08:19:17 -06:00
Gregory Nutt fc127fd297 sched/signal: Add a generic signal notification facility. Modify the custom IOB available notifier so that it is now just a wrapper around this generic signal notification. This generic signal notification faility will, eventually, be used to support network polling.
Squashed commit of the following:

    mm/iob:  The IOB available notifier is now just a wrapper around the common signal notifier.

    sched/signal:  Add a generic signal notification facility.

    sched/signal/sig_evthread.c:  More trivial naming changes.

    sched/signal:  Rename nxsig_notification() to nxsig_evthread() to make forthcoming naming additions more consistent.
2018-09-09 08:32:37 -06:00
Gregory Nutt 8e203e09d4 Costmetic changes 2018-08-19 11:19:43 -06:00
Gregory Nutt 8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -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 4810499d3a Squashed commit of the following:
Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable.

    sched/signal:  Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable.
2017-10-07 10:57:09 -06:00
Gregory Nutt 8198ba6a6d This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.

Squashed commit of the following:

    sched/signal:  Fix a few compile warnings introduced by naming changes.

    sched/signal:  Rename all private, internal signl functions to use the nxsig_ prefix.

    sched/signal:  Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 13:25:25 -06:00
Bruno Herrera 24767a0c66 Fixes for problems found by Coverity in the nuttx repository:
net/socket/recvfrom.c: Check fromlen integrity before using it.

    net/socket/net_sockets.c: Always check for valid psock before using.

    net/tcp/tcp_send_unbuffered.c:  Avoid using psock beforing checking its integrity.

    sched/timer/timer_create.c: Fix watchdog resource leak if cannot allocate a new timer.
2017-09-25 07:17:09 -06:00
Arjun Hary b274a97840 Miscellaneous fixes from astyle tool. 2017-08-14 17:19:27 -06:00
Jussi Kivilinna c57d49f420 clock: Add new type ssystime_t for relative 64-bit ticks, change ticks<->time conversion functions to use ssystime_t 2017-04-21 08:51:31 -06:00
Gregory Nutt 3404b3cb4a sched/: Review and correct some stylistic inconsistencies 2016-08-07 08:32:11 -06:00
Gregory Nutt 18ce4ff57b sched/: Review and correct some stylistic inconsistencies 2016-08-07 08:25:30 -06:00
Gregory Nutt 6543c570d4 Remove some empty file section section header comments 2016-02-17 17:38:39 -06:00
Gregory Nutt e6bd3544f6 Fix a name collision introduced in last commit 2016-02-14 08:20:35 -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 61819c0e3e Fix a typo in last commit that was not noticed until CONFIG_SIG_EVTHREAD was enabled 2016-01-28 16:50:20 -06:00
Gregory Nutt da5115e3e6 Correct an error in timer_created intoduced when SIGEV_THREAD support was added. 2016-01-28 16:38:54 -06:00
Gregory Nutt 849df03d22 Update dates on files modified for SIGEV_THREAD support 2015-12-30 13:28:39 -06:00
Gregory Nutt 9835eeb181 signals: Basic framework to support SIGEV_THREAD 2015-12-30 13:20:31 -06:00
Gregory Nutt c16648b3fd Most cosmetic but also includes a fix for a compile problem from Ken Pettit 2015-12-01 12:54:57 -06:00
Gregory Nutt 79d554939e sched/: Fix some spacing issues 2015-10-07 19:59:14 -06:00
Gregory Nutt 768d892188 Add si_errno to siginfo_t 2015-08-14 10:10:32 -06:00
Gregory Nutt ea7dbc984b Add basic sporadic schedule state machine 2015-07-24 09:03:21 -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 b4423c1eed Make some file section headers more consistent with standard 2015-04-08 06:47:36 -06:00
Gregory Nutt 322f9f401c Simplify how C source files are selected in the build 2014-10-07 07:42:36 -06:00
Gregory Nutt 1780810d3d Rename kmalloc to kmm_malloc for consistency 2014-08-31 17:26:36 -06:00
Gregory Nutt 0ab1b0de25 nuttx/sched: Remove explicit references to errno. That is a problem from within the kernel for certain configurations 2014-08-28 17:00:24 -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 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 a79ecce878 Move page fill sources from sched/ to sched/paging 2014-08-08 15:08:07 -06:00
Gregory Nutt f8da16a8d3 Move POSIX timer files from sched/ to sched/timer/ 2014-08-08 14:55:16 -06:00