Commit Graph

1447 Commits

Author SHA1 Message Date
zhangyuan7 b33fc302f0 net/inet and net/tcp: Fix tcp close flow; free the connection after all tcp close process finished. 2019-08-30 06:44:43 -06:00
Gregory Nutt 53d5e44d89 Cosmetic updates. 2019-08-28 15:14:27 -06:00
Gregory Nutt b912c6fbff sched/clock/clock_timekeeping.c: fix cases in time conversion that must be >= NSEC_PER_SEC, not >NSEC_PER_SEC. Similar to fix of f9e80c4a1e. 2019-08-27 18:18:10 -06:00
Gregory Nutt 5f02b0335f syscall/ and related: Fix an error found in build testing. Inconsistent conditional compilation led to link errors in certain configurations. 2019-08-27 16:41:07 -06:00
igd 32bac84548 sched/Kconfig, sched/signal/sig_notification.c: Add configuration option to decide select either the high-priority or low-priority work queue for SIG_EVTHREAD notifications. 2019-08-26 10:54:49 -06:00
Gregory Nutt fb50a65756 boards/: Move more drivers directories at were placed too high in the hieararchy. 2019-08-24 14:42:14 -06:00
Gregory Nutt 3c30cf1f05 Squashed commit of the following:
task_spawn() and posix_spawn() are NuttX OS interfaces.  In PROTECTED and KERNEL build modes, then can be reached from applications only via a system call.  Currently, the number of parameters in a system call is limited to six; these spawn function have seven parameters.  Rather than extend the maximum number of parameters across all architectures, I opted instead to marshal the seven parameters into a structure.
     *

In order to support builtin in function in protected mode, a task_spawn() system call must be supported.  Unfortunately this is overly complex because there is a (soft) limit of 6 parameters in a system call; task_spawn has seven paramters.  This is a soft limit but still difficult to extend because it involves assembly language changes to numerous architectures.  Better to get more creative.
2019-08-23 13:20:52 -06:00
Gregory Nutt bff30ff9bc Fix minor typo / copy-paste. 'cancellaction point'->'cancellation point' 2019-08-23 11:57:35 -06:00
Nathan Hartman 248f75fda4 sched/Kconfig: Fix minor typos. 2019-08-18 18:04:08 -06:00
Gregory Nutt a276942f59 Fix minor typos in comments 2019-08-15 14:06:11 -06:00
Gregory Nutt e6da85deb3 sched/group/group_setuid.c and group_setguid.c: Verify that the UID/GID is within range. 2019-08-10 10:42:53 -06:00
Gregory Nutt ec5120f69e sched/group and syscall/: Implement 'real' setuid, getuid, setgid, and getgid interfaces. These will be inheritance by all child task groups. 2019-08-06 14:13:43 -06:00
김정찬 a12f80fb90 sched/mqueue/mq_desclose.c: Add a test to verify that message queue is closed by the same task group that opened it. If not, then list corruption would result. This test is only performed if CONFIG_DEBUG_FEATURES is enabled since it should not normally be an issue: It would be a strange programming practice to open a message queue in open task group, then close it in another. 2019-08-05 18:30:07 -06:00
Nathan Hartman 68d43d3679 Fix typos. 2019-08-04 14:50:28 -06:00
Gregory Nutt 0050172108 sched/group/group_create.c: Update some comments. 2019-08-03 08:18:58 -06:00
Gregory Nutt 8e321aba84 sched/: Correct some naming. The NuttX task groups have been using the acroynum 'gid' and also the type 'gid_t' for the the task group ID. That is incorrect. Than naming is reserved for use with group permissions. So these were all named to grpid and grpid_t so that it is clearer that these refer to NuttX task group IDs, and not to group permissions. 2019-08-02 10:01:30 -06:00
Gregory Nutt 4c800ca372 sched/task/task_exithook.c: Update some commits. include/nuttx/sched.h: Fix some complaints from nxstyle. 2019-08-02 08:49:26 -06:00
Gregory Nutt eda7f5f379 sched/task/task_exithook.c: nxtask_signalparent() in task_exithook.c may invalidate the group's parent task ID (tg_ppid) too soon. The tg_ppid field is use only to remember the parent tasks ID so that it can send the SIGCHLD signal to it. So it must stay valid until SIGCHLD has been sent. In nxtask_signalparent(), it calls nxtask_sigchild() to send SIGCHLD to the parent, then invalidates tg_ppid. That would be okay, except that the SIGCHLD is only sent when the last member of the group terminates. That is incorrect; tg_ppid can be invalidated too soon and, as a consequence, SIGCHLD would never be sent.
Noted by Jeongchan Kim in the Google group:  https://groups.google.com/forum/#!topic/nuttx/SXd8fVwVKBk
2019-08-01 08:14:11 -06:00
Nathan Hartman 32e9ba7604 Documenation/, configs/: ix typos and one HTML syntax error. Fix HTML syntax error in Documentation/NfsHowto.html: <coce> -> <code> html tag. 2019-07-30 16:10:15 -06:00
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