Commit Graph

1478 Commits

Author SHA1 Message Date
Gregory Nutt
9f24fb5b4b sched/: Add some missing FAR. Update some comments. 2019-07-29 15:04:39 -06:00
David S. Alessio
7a151016c2 sched/semaphore/sem_holder.c: Fix a race in telnet with PRIORITY_INHERITANCE and SCHED_HPWORK. Sometimes causes an assertion to fire incorrectly. 2019-07-29 08:14:30 -06:00
Gregory Nutt
3252e35280 Add comments; minor spelling fix in comments. 2019-07-20 09:21:28 -06:00
Yang ChungFan
8181a92a1d ched/sched/sched_waitpid.c: In waitpid, remember to grab the exited child ptr. After being unblocked in waitpid, the child pointer might be NULL. Modify to use group_exitchild to get the pointer of recent exited child. 2019-07-20 07:20:21 -06:00
Gregory Nutt
bde0509cae tools/nxstyle.c: Fix error in conditional logic that was preventing detection bad brace alignment. Add logic to handle alignment of braces in data initializators which following slightly different indentation rules. 2019-06-30 10:35:10 -06:00
Gregory Nutt
df3ea977bf sched/semaphore/sem_holder.c: Fix a bad assertion. The comments state correctly that we cannot make any assumptions about the number of holders of the semaphore, yet the code asserts if there are any holders. This makes the code behave closer to what the comments say. 2019-06-28 21:47:32 -06:00
Gregory Nutt
d7c4cca84d Trivial typo fix to a comment. 2019-06-25 12:27:26 -06:00
Juha Niskanen
abc49a6a13 arch/arm/src/stm32l4: if SRAM3 is used as heap, do not power it off in stop 2 mode. 2019-06-13 05:52:40 -06:00
Gregory Nutt
7ab149d8e9 Various fixes to get a clean compile with the SDCC compiler. Compile is 'almost' clean. 2019-06-03 16:53:11 -06:00
Gregory Nutt
84a57f8fa0 Fix several ZNeo compile issues. There are more. Pthreads: Fix a could of places where FAR was added when it is not appropriate. This matters to ZNeo which depends on definitions of NEAR and FAR points. 2019-06-03 13:06:58 -06:00
Gregory Nutt
7a0481d2a9 drivers/net/telnet.c: Fix a C89 non-compliance that was breaking the ez80 build. 2019-06-03 08:20:21 -06:00
Gregory Nutt
e4069ebe5e include/nuttx/signal.h: Fix a C89 compliance problem that cause the ez80 build to fail. Empty structure and unions are not accepted by the compiler. 2019-06-03 08:12:20 -06:00
Gregory Nutt
2767e80459 Squashed commit of the following:
ez80:  Fixing a few more compile problems.  I am afraid that the 5.3.0 compiler it too buggy to use.
    ez80:  Additional build-related fixed.
    eZ80:  Updating to use the newest ZDSII 5.3.0 toolchain.
2019-06-02 11:05:31 -06:00
Gregory Nutt
b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Gregory Nutt
c2136fda6d sched/signal/sig_default.c: The abnormal termination handler was just calling exit() conditionally when, for example, Ctrl-C is sent to a task. The abnormal termination handler must obey the rules of cancellation points: If cancelation is disabled, then the abnormal termintion logic must wait for cancelation to be re-enabled; If cancellation is deffered then the abnormal termination logic may have to wait for the victim task to enter or exit a cancellation point. 2019-05-17 07:39:04 -06:00
Gregory Nutt
abf6965c24 Squashed commit of the following:
libs/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    syscall/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    wireless/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    Documentation/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    include/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    drivers/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    sched/:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    configs:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/xtensa:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/z80:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/x86:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/renesas and arch/risc-v:  Remove references to CONFIG_DISABLE_SIGNALS.  Signals can no longer be disabled.
    arch/or1k:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/misoc:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/mips:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/avr:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
    arch/arm:  Remove all references to CONFIG_DISABLE_SIGNALS.  Signals are always enabled.
2019-04-29 14:52:05 -06:00
Gregory Nutt
0863e771a9 Revert "sched/clock/clock_initialize.c: clock_inittime() needs to be done with CONFIG_SCHED_TICKLESS and clock_initialize should skip clock_inittime() for external RTC case since the RTC isn't ready yet."
This reverts commit 2bc709d4b9.

Commit 2bc709d4b9 was intended to handle the case where up_timer_gettime may not start from zero case.  However, this change has the side-effect of breaking every implementation of tickless mode:  After this change the tickless timer structures are used before they are initialized in clock_inittime().  Initialization happens later when up_initialize is called() when arm_timer_initialize().

Since the tickless mode timer is very special, one solution might be to

1. Rename xxx_timer_initialize to up_timer_initialize
2  Move up_timer_initialize to include/nuttx/arch.h
3.  Call it from clock subsystem instead up_initialize

Basically, this change make timer initialization almost same as rtc initialization(up_rtc_initialize).

For now, however, we just need to revert the change.
2019-04-26 07:24:57 -06:00
Matous Pokorny
1e54a14c9f Fix some typos in comments. 2019-04-15 07:56:53 -06:00
Joao Matos
08ff68edec sched/pthread: Added non-standard pthread_get_stackaddr_np() and pthread_get_stacksize_np(). 2019-04-04 10:30:46 -06:00
Gregory Nutt
842d3dc4e5 Rename sched_alarm_expiration to nxsched_alarm_expiration. That is the appropriate name for an internal sched/ function (still many named incorrectly). 2019-03-20 19:34:23 -06:00
Gregory Nutt
9acb652e29 Rename sched_timer_expiration to nxsched_timer_expiration. That is the appropriate name for an internal sched/ function (still many named incorrectly). 2019-03-20 19:31:43 -06:00
Gregory Nutt
b290160b3b Rename sched_process_timer to nxsched_process_timer. That is the appropriate name for an internal sched/ function (still many named incorrectly). 2019-03-20 19:27:40 -06:00
Gregory Nutt
f6ac82e246 Backs out part of commit d7a602e9b2. When CONFIG_SCHED_CPULOAD_EXTCLK is defined, the prototype must still be available in nuttx/arch.h 2019-03-20 19:17:30 -06:00
Valmantas Paliksa
d7a602e9b2 sched/sched and include/nuttx/arch.h: Rename sched_process_cpuload to nxsched_process_cpuload. All internal sched_ functions should be prefixed with nx. Remove duplicate prototype from nuttx/arch.h. 2019-03-20 08:01:27 -06:00
Gregory Nutt
622202da20 binfmt/nxflat.c: Update to last NxFLAT change: The logic must respect the reference count before freeing the dspace memory region. 2019-03-12 09:44:18 -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
Gregory Nutt
c8004c7e00 tools/nxstyle.c: Add capability to detect CamelCase identifiers. 2019-03-05 13:08:57 -06:00
Gregory Nutt
5fe6981c9a Squashed commit of the following:
libs/libc/pthread/pthread_spinlock.c:  Resolve several TODO issues by accessing up_testset() via the boardctl() interface rather than attempting to call it directly.

    configs/boardctl.c, include/sys/boardctl.h:  Add access to architecture-specific up_testset() via boardctl().

    arch/Kconfig's, sched/Kconfig, and include/nuttx/spinlock.h:  Spinlocks are not available unless the architecture supports the up_testset() operation.
2019-03-04 14:22:50 -06:00
Gregory Nutt
f914ec6e2b tools/nxstyle.c: Fix logic that detects if an operator is correctly delimited with spaces. sched/: Various changes because sched/ C files were used as Guinea Pigs to test nstyle.c. 2019-03-01 10:50:02 -06:00
Gregory Nutt
3c0f6f4876 arch/xtensa/src/esp32/esp32_serial.c: Fix some backward arguments. Correct 2-stop bit setting.
sched/sched/sched_waitid.c:  Could exit without leaving critical section on some error conditions.
sched/signal/sig_deliver.c: Update some comments.
2019-02-28 11:32:31 -06:00
Gregory Nutt
0951151c33 libs/libc/pthread, syscall/, and include/sys/syscall.h: Support for pthread_mutex_timedlock() was added recently, however no new system call was added for the API make is usable only in the FLAT build. With a pthread_mutex_timedlock() system call, there is no reason for a pthread_mutex_lock() system call since it is now nothing more than an wrapper around pthread_mutex_timedlock(), passing NULL for the time value. The pthread_mutex_lock() syscall was removed and the pthread_mutex_lock() implemented was moved from /sched/pthread to where it now belows in libs/libc/pthread. 2019-02-25 18:19:13 -06:00
Gregory Nutt
9a5134acac sched/pthread/pthread_mutexlock.c: Fix an error in last PR. The abs_timeout value as not being passed from pthread_mutex_timedlock() to pthread_mutex_take(). 2019-02-24 16:04:48 -06:00
Gregory Nutt
c7cc6bab96 included/pthreads, sched/pthreads, and Documetions: Updates after review of last PR. 2019-02-24 14:40:11 -06:00
Leif Jakob
58e387fc6f Merged in leif_jakob/nuttx/pthread_mutex_timedlock (pull request #830)
support for pthread_mutex_timedlock

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-02-24 20:04:24 +00:00
Gregory Nutt
11eb7ef4f8 Minor fixed to documents and C comments. 2019-02-23 17:46:43 -06:00
Gregory Nutt
2fbec4cdf6 Doumentation/NuttxPortingGuide.html: Add description of board_early_initialize() and board_late_initialize(). 2019-02-18 17:36:11 -06:00
Gregory Nutt
32a300806e Let's rename board_driver_initialize() to board_early_initialize() to emphasize its relationship to board_late_initialize(). 2019-02-18 16:25:08 -06:00
Gregory Nutt
a76e137ce2 Squashed commit of the following:
sched/init/nx_start.c:  Add support for CONFIG_BOARD_DRIVER_INITIALIZE.  If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().

    Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.

    Raname board_initialize() to board_late_initialize()
2019-02-18 15:32:00 -06:00
Gregory Nutt
bc5908d9fd tools/nxstyle.c: Beef up logic that detects multiple variable definitions per line. 2019-02-17 10:57:28 -06:00
Michał Łyszczek
626afb015b nuttx/sched/mqueue: Change 'int prio' to 'unsigned int prio'. According to open group specification, priority field in mq_* functions should have unsigned type: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html 2019-02-15 19:18:55 -06:00
Gregory Nutt
fa1e151b12 sched/: Removed too much conditional compilation in commit 967dc523bb 2019-02-12 21:01:22 -06:00
Gregory Nutt
967dc523bb sched/: Remove the option CONFIG_BOARD_INITTHREAD. Now, if CONFIG_BOARD_INITIALIZE is selected, then the board_initialize() logic will ALWAYS run on an internal kernel thread. This will prevent the problems people have had doing inappropriate board_initialization on the IDLE thread. 2019-02-12 19:13:22 -06:00
Gregory Nutt
efe65749ce Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
2019-02-11 15:47:25 -06:00
Gregory Nutt
a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00
Gregory Nutt
a2e62f557d Squashed commit of the following:
sched/init/nx_bringup.c:  Fix a naming collision.
    sched/init:  Rename os_start() to nx_start()
    sched/init:  Rename os_smp* to nx_smp*
    sched/init:  Rename os_bringup to nx_bringup
    sched/init:  rename all internal static functions to begin with nx_ vs os_
2019-02-04 16:20:35 -06: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
Gregory Nutt
90e4cf4349 mm/umm_heap: sbrk() is only available in the KERNEL build. 2019-02-04 10:32:31 -06:00
Gregory Nutt
641a98a434 arch/: The saved return register state is available on the user stack. Thic commit reorders some logic so that certain, critical registers are preserved in the TCB. This does not make the logic 100% secure, but does prevent some obvious things. sched/signal/sig_delivery: Add a flag to the TCB to indicate that we are in a signal handler. Use this flag to assure that a there a never attempts to nest signal handling operations on a thread. This was guaranteed before but when locking of pre-emption during signal delivering was eliminated in a previous commit, there was a remote possibility of an attempt to do nested signal handling. This flag assures that there is only one signal handled at a time. 2019-02-03 15:29:47 -06:00
Gregory Nutt
71e6793702 sched/sched: Rename all internal, static functions from sched_* to nxsched_* to indicate that they are NuttX internal functions. This is only a start. Eventually, need to rename all sched_ functions prototyped in sched/sched/sched.h and in include/nuttx with nxsched_. 2019-02-03 14:18:39 -06:00
Gregory Nutt
1b1be1f327 sched/signal/sig_deliver.c: Restructure nxsig_deliver() so that the signal handler is not called with the pre-emption disabled (or, at least no with pre-emption disabled by nxsig_deliver() itself). 2019-02-03 10:39:41 -06:00
Gregory Nutt
40b74d1f1c sched/wqueue/kwork_notifier.c: Fix broken assertion introduced in recent commit. Breaks non-error path. Suggested by Jussi Kivilinna in Butbucket commit comment. 2019-02-01 08:53:18 -06:00
Gregory Nutt
8dd17362e3 sched/sched/sched_processtimer.c: Should include board if CONFIG_SYSTEMTICK_HOOK=y. 2019-01-30 08:21:09 -06:00
Gregory Nutt
6408857f6d sched/sched/sched_processtimer.c: Add a configurable call out to a user-provided function, 'timer hook', on each timer interrupt. 2019-01-30 07:22:44 -06:00
Gregory Nutt
78c8485b0d Fix some warnings found in build testing. 2019-01-27 17:23:01 -06:00
Xiang Xiao
d6b0b0d94b sched/mqueue/mq_desclose.c: Fix warning: variable 'msgq' set but not used 2019-01-27 11:08:28 -06:00
ligd
14573202bc sched/sched/sched_timerexpiration.c: Fix macro SEC2TICK() 32-bits overflow by using uint64_t in calculation. 2019-01-27 11:07:09 -06:00
Gregory Nutt
cc8878f08a sched/Kconfig: Change SCHED_NOTE_GET type from int to bool~ 2019-01-27 11:04:54 -06:00
Xiang Xiao
fe421022e2 sched/wqueue/kwork_notifier.c and several Kconfig files: Notifier should work with either lpwork or hpwork and other minor typo fix. 2019-01-27 11:02:56 -06:00
Xiang Xiao
e57f7cf6ae Critical Section Monitor (sched/ and fs/procfs: Remove SCHED_IRQMONITOR_GETTIME to simplify the clock source selection: (1) Use up_critmon_gettime if SCHED_IRQMONITOR, (2) Call clock_systimespec if SCHED_TICKLESS, (3) Don't collect timing info for all other cases and move up_critmon_* to arch.h avoid the duplicated declaration. 2019-01-27 10:13:28 -06:00
Xiang Xiao
fb63c0a293 sched/signal and related changes to other OS subsystems. 2019-01-27 09:28:59 -06:00
Xiang Xiao
c43e4673ab sched/Kconfig, libs/libc/dllfcn/Kconfig, libs/libc/modlib/Kconfig: Refine ELF related configurations. 2019-01-26 11:50:09 -06:00
anchao
88efb84847 libs/libc/dllfcn, sched/init: Add LD_LIBRARY_PATH environment variable support. 2019-01-26 11:47:14 -06:00
Xiang Xiao
9e2238f6cd libs/libc/dllfcn: Implement dlerror using strerror. 2019-01-26 11:39:05 -06:00
Xiang Xiao
095e28d45e binfmt/, binfmt/libelf/, include/nuttx, libs/libc/machine, libs/libc/modlib, and others: Move elf related arch function to include/nuttx/elf.h because the implementation is located in libs/libc/machine and in order to avoid the conflict with the 3rd party libraries and clean up the file inclusion: (1) Remove redundant elf32.h, (2) Remove nuttx/binfmt/elf.h in libs/libc/machine, (2) Remove nuttx/binfmt/elf.h in modlib, and (4) Rmove nuttx/module.h in modlib. 2019-01-26 11:18:45 -06:00
Gregory Nutt
bdd02a6aed Some cosmetic updates, mostly to spacing and comments. 2018-12-30 11:58:19 -06:00
Gregory Nutt
40cdc187bb mm/mm_heap/mm_sem.c and sched/task/task_getpid.c: Commits 43d37c866b and f37202cbc0 resolved some problems with the original fix of 91aa26774b. However, Those changes used an internal OS interface (sched_self()) which is not available when the the user-space memory manager is built in the PROTECTED or KERNEL builds and resulted in build failures.
This commit repartitions the logic by moving some of the changes from mm_sem.c into task_getpid.c.  The logic is equivalent for the case of mm_trysemaphore(), but no has wider impact since it potentially affects all callers of getpid().  Hence, this change may also introduce some other issues that will need to be addressed.
2018-12-30 08:41:06 -06:00
David Sidrane
24db683368 arch/arm/src/imxrt/chip/imxrt106x_pinmux.h: Add FLEXCAN3 to pinmux 2018-12-28 15:08:20 -06:00
Gregory Nutt
8b21960ba3 sched/pthread: Implement pthread_key_delete(). This involves some minor changes to the group data structure. 2018-12-28 14:21:19 -06:00
David Sidrane
bf6f44dec8 sched/Kconfig and sched/init/os_bringup.c: Allow the init task priority to be set. 2018-12-20 10:49:10 -06:00
Gregory Nutt
9d1c845dcc Revert "This patch prevent heap corruption as in below case."
This solution to the problem noted by EunBong Song results in major memory fragmentation and and out-of-memory conditions on the PX4 platform.  On that platform the lower priority work queue is very low priority and essentially never runs when the system is busy.  As a result, the systems gets slowly starved of memory until failures and bad behaviors begin to occur.

This is an addition patch coming later to result the original problem in a different way that does not have cause memory starvation.

This reverts commit 91aa26774b.
2018-12-20 10:11:36 -06:00
Gregory Nutt
00b5ba0cf0 sched/task/task_spawn.c: Correct description of input parameters to task_spawn_exec(). Noted by: JeongchanKim 2018-12-18 07:37:07 -06:00
David Sidrane
5433ec589b fs/driver/fs_blockpartition.c: Fix void pointer warning.
libs/libc/unistd/lib_daemon.c:  Fix compiler error is streams disabled.
sched/irq/irq_procfs.c:  Fix warning
sched/task/task_vfork.c: Fix void * math warning
2018-12-03 17:54:21 -06:00
Gregory Nutt
3b22d13493 sched/: Add debug assertions before each call to up_block_task() to assure that there is no attempt to block an IDLE task. 2018-11-30 06:54:15 -06:00
Xiang Xiao
af96756995 sched/sched/sched_gettcb.c: Fix break in building introduced in a recent commit. 2018-11-30 06:40:51 -06:00
Gregory Nutt
454d59b049 sched/sched_foreach.c: sched_foreach() should not have to hold the critical section over the entire traversal. It should be acceptable to simply only the critical section while one entry is being processed (the caller can always call sched_foreach within a critical section is greater stability is needed. sched/sched_gettcb.c: Recent changes removed critical sections around calls to sched_gettcb.c. However, there is a very should sequence of instructions that actually does require the critical section. That short sequence no manages its own critical section. 2018-11-29 13:09:56 -06:00
Gregory Nutt
d8cf3bfe25 Rethink some of the conditional logic of commit 1ac9558460: If the Critical Section Monitor enabled, that that platform-specific timer should be used to measure interrupt processing time, no matter what. 2018-11-26 12:18:58 -06:00
Gregory Nutt
553c566650 sched/irq: Include a few ProcFS-related changes missed in commit 1ac9558460 2018-11-26 12:01:36 -06:00
Gregory Nutt
1ac9558460 sched/irq and sched/sched: Measurement of interrupt handler duration used to be available only in Tickless mode since it used the high resolution Tickless timer to measure interrupt time. This commit adds CONFIG_SCHED_IRQMONITOR_GETTIME which, if enabled, will force the interrupt duration caculation to use the same high-resolution, platform-specific timer as is used with the Critical Section Monitor. This leads to two improvements: (1) You can now measure interrupt duration in non-Tickless mode, and (2) in either mode, the interrupt duration and the critical section measures will use the same high-resulotion timer and should, therefore, never be any descripancy due to different clock sources. 2018-11-26 11:29:20 -06:00
Gregory Nutt
80e7107c9f sched/irq/Make.defs: Fix warning about irq_csection.o appearing multiple times in the same rule. 2018-11-25 17:22:33 -06:00
Gregory Nutt
4ca7b72a98 sched/Kconfig: Simplify some configurations. This adds configuration settings that control individual features, rather than long complex OR expressions that determines if an individual feature is required. 2018-11-25 11:50:15 -06:00
Gregory Nutt
865cc85dfd sched/sched/sched_critmonitor.c: A correct a logic error. arch/sim/src/up_critmon.c: Use higher resolution timer. 2018-11-25 09:49:21 -06:00
Gregory Nutt
491ef22b63 sched/sched/sched_critmon.c: Design simplication. Now that irqcount is always available, there is no need for the flags that were used to retain IRQ state. 2018-11-25 07:41:52 -06:00
Gregory Nutt
095b597d34 sched/sched and fs/procfs: Fix some bus in critical section monitor found in testing 2018-11-24 17:58:35 -06:00
Gregory Nutt
807d5bb4ae Critical Section Monitor: Add low level timer support for simulation. Fix serial bugs and logic errors in initial implementation. Still does not work; takes assertions. 2018-11-24 15:07:12 -06:00
Gregory Nutt
85c31fd4a2 fs/procfs/fs_procfscritmon.c and sched/sched/sched_critmonitor.c: Add support for global pre-emption and global critical sections to monitor as suggested by Xiang Xaio. 2018-11-24 13:33:37 -06:00
Gregory Nutt
a1cb270478 configs/stm32f4discovery: Add timing support for the critical section monitor using the DWT CYCNT register. 2018-11-24 11:06:34 -06:00
Gregory Nutt
fc6084f311 Squashed commit of the following:
fs/procfs/fs_procfsproc:  Extended the process ID ProcFS output to show per-thread maximum time for pre-emption disabled and maximum time within a critical section.

    sched/sched/sched_critmonitor.c:  Adds data collection logic in support of monitoring critical sections and pre-emption state.
2018-11-24 10:32:45 -06:00
Gregory Nutt
d2a11cdea5 sched/signal/sig_timedwait.c: Remove unnecessary disble of pre-emption. 2018-11-23 06:59:48 -06:00
Xiang Xiao
dbf01d12b7 Assertions: Identify the running task correctly when dumping task state information. It takes time to switch to the target task after g_readytorun has been modified. If panic/assert happen during this period, the dump will contain the incorrect and confusing information due to the difference between the real running task and the return value of this_task(). This change resolve this problem by adding g_running_task to track the real running task through the context switch. 2018-11-15 07:11:51 -06:00
Xiang Xiao
f337cc1380 sched/clock/ timekeeping: Use clock_basetime() to initialize g_clock_wall_time to get the best initial RTC value and initialize g_clock_last_counter too since the hardware may not start counting from zero. 2018-11-12 07:00:41 -06:00
Xiang Xiao
2bc709d4b9 sched/clock/clock_initialize.c: clock_inittime() needs to be done with CONFIG_SCHED_TICKLESS and clock_initialize should skip clock_inittime() for external RTC case since the RTC isn't ready yet. 2018-11-12 06:55:53 -06:00
Xiang Xiao
f0c5c75042 sched/clock/: Don't call up_timer_gettime in clock_gettime and clock_systimer to ensure the return value from them consistent with clock_systimespec 2018-11-12 06:52:56 -06:00
Xiang Xiao
46bd8798c5 ched/clock/: Remove g_monotonic_basetime and g_clock_monotonic_time since we don't need ensure monotonic time start from zero as state here: http://pubs.opengroup.org/onlinepubs/009696899/functions/clock_getres.html 2018-11-12 06:50:37 -06:00
Xiang Xiao
1ef2602933 sched/clock/clock_getres.c: Support CLOCK_MONOTONIC 2018-11-12 06:42:38 -06:00
Xiang Xiao
43706cd797 net/arp: Redesign ARP table aging to simplify the net initialization 2018-11-09 13:54:55 -06:00
ligd
712540b6a0 sched/wdog: improve accuracy of wd_gettime() in tickless mode 2018-11-09 09:27:40 -06:00
ligd
441cf6c207 sched/wdog: improve accuracy of wd_gettime() in tickless mode 2018-11-09 09:26:34 -06:00
Xiang Xiao
d32d9d4b24 fs/partition: Try MTDIOC_GEOMETRY IOCTL before bops's geometry
fs/driver/fs_blockpartition.c:  Support MTD IOCTL
2018-11-08 09:41:54 -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
dongjianli
057d555129 sched/signal and syscall/: Add support for pselect() and ppoll() functions 2018-11-08 07:45:23 -06:00