Commit Graph

810 Commits

Author SHA1 Message Date
Jiuzhu Dong
4d5a964f29 net: unify socket into file descriptor
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Masayuki Ishikawa
409c65ce0b arch, sched: Fix global IRQ control logics for SMP
Summary:
- This commit fixes global IRQ control logic
- In previous implementation, g_cpu_irqset for a remote CPU was
  set in sched_add_readytorun(), sched_remove_readytorun() and
  up_schedule_sigaction()
- In this implementation, they are removed.
- Instead, in the pause handler, call enter_critical_setion()
  which will call up_cpu_paused() then acquire g_cpu_irqlock
- So if a new task with irqcount > 1 restarts on the remote CPU,
  the CPU will only hold a critical section. Thus, the issue such as
  'POSSIBLE FOR TWO CPUs TO HOLD A CRITICAL SECTION' could be resolved.
- Fix nxsched_resume_scheduler() so that it does not call spin_clrbit()
  if a CPU does not hold a g_cpu_irqset
- Fix nxtask_exit() so that it acquires g_cpu_irqlock
- Update TODO

Impact:
- All SMP implementations

Testing:
- Tested with smp, ostest with the following configurations
- Tested with spresense:wifi_smp (NCPUS=2,4)
- Tested with sabre-6quad:smp (QEMU, dev board)
- Tested with maix-bit:smp (QEMU)
- Tested with esp32-core:smp (QEMU)
- Tested with lc823450-xgevk:rndis

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
Masayuki Ishikawa
6b767c6856 Revert "Update TODO regarding SMP"
This reverts commit 96c29e75b7.
2020-11-25 00:02:37 +01:00
Masayuki Ishikawa
96c29e75b7 Update TODO regarding SMP
Summary:
- 'POSSIBLE FOR TWO CPUs TO HOLD A CRITICAL SECTION' was resolved

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-20 00:49:25 -08:00
Masayuki Ishikawa
12862c7b33 armv7-a: Fix comments on Cortex-A SGI
Summary:
- I noticed that Cortex-A SGI can be masked
- We thought the SGI is not maskable
- Although I can not remember how I tested it before
- It actually works as expected now
- Also, fixed the number of remaining bugs in TODO

Impact:
- No impact

Testing:
- Tested with sabre-6quad:smp (QEMU and dev board)
- Add the following code in up_idle() before calling asm("WFI");
+  if (0 != up_cpu_index())
+    {
+      up_irq_save();
+    }
- Run the hello app, you can see "Hello, World!!"
- But nsh will freeze soon because arm_pause_handler is not called.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-19 18:01:30 -08:00
Masayuki Ishikawa
064451b4ee Update TODO and sabre-6quad/README.txt regarding SMP
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-11-14 16:40:01 -08:00
Yoshinori Sugino
c13f869432 Modify SIGSTP to SIGTSTP
Follow the POSIX description.
SIGTSTP should be sent when the Ctrl-Z characters is encountered, not SIGSTP.

Testing:
Built with hifive1-revb:nsh (CONFIG_SERIAL_TERMIOS=y, CONFIG_SIG_DEFAULT=y and CONFIG_TTY_SIGTSTP=y)
2020-10-29 01:12:43 -07:00
Xiang Xiao
1aed34182a tools/testbuild.sh: Don't support to change size_t type in datlist
since it doesn't need anymore with the follow patch:
commit e7d9260014
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Mon Feb 17 20:19:25 2020 +0800

    arch: Customize the typedef of size_t instead of intptr_t

    To ensure size_t same as toolchain definition in the first place and
    rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether
    __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition
    can align with toolchain(gcc/clang) definition automatically.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-26 21:45:11 -07:00
Xiang Xiao
eb4121ce38 Change all 'Nuttx' to 'NuttX'
Unify the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Xiang Xiao
bf7399a982 arch: Initialize idle thread stack information
and remove the special handling in the stack dump

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia1ef9a427bd4c7f6cee9838d0445f29cfaca3998
2020-09-16 06:57:29 -07:00
Brennan Ashton
4cb193d530 Docs: Update links to old website and wiki
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-08-30 19:16:30 -03:00
Gregory Nutt
deb3b13759 Udate TODO List
Remove an issues that has recently be resolved.
2020-07-02 20:58:37 +01:00
Gregory Nutt
82debdc213 Make task_init() and task_activate() internal OS functions.
-Move task_init() and task_activate() prototypes from include/sched.h to include/nuttx/sched.h.  These are internal OS functions and should not be exposed to the user.
-Remove references to task_init() and task_activate() from the User Manual.
-Rename task_init() to nxtask_init() since since it is an OS internal function
-Rename task_activate() to nxtask_activate since it is an OS internal function
2020-05-25 23:54:45 +01:00
Xiang Xiao
bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -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
3dca5eba15 Completes the Implementation of the TLS-based errno
- Remove per-thread errno from the TCB structure (pterrno)
- Remove get_errno() and set_errno() as functions.  The macros are still available as stubs and will be needed in the future if we need to access the errno from a different address environment (KERNEL mode).
- Add errno value to the tls_info_s structure definitions
- Move sched/errno to libs/libc/errno.  Replace old TCB access to the errno with TLS access to the errno.
2020-05-07 23:11:34 +01:00
Gregory Nutt
c2244a2382 Remove CONFIG_TLS
A first step in implementing the user-space error is force TLS to be enabled at all times.  It is no longer optional
2020-05-07 12:04:16 -06:00
Gregory Nutt
87dbd7d52d TODO: Remove simulator SMP bug
My understanding is the Xiao Xiang has corrected this problem so it should no longer be carried as a bug
2020-04-19 04:19:04 +08:00
Nathan Hartman
a5e643b0cd Fix typos in comments and documentation. 2020-03-16 20:01:11 -06:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao
bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao
dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao
e7d9260014 arch: Customize the typedef of size_t instead of intptr_t
To ensure size_t same as toolchain definition in the first place and rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition can align with toolchain(gcc/clang) definition automatically.
2020-02-18 07:15:19 -06:00
Gregory Nutt
ebce5fb7ca Squashed commit of the following:
Author: patacongo <spudarnia@yahoo.com>

    Todo (#34)

    * Documentation/NuttXCCodingStandard.html:  Remove requirement to decorate ignored returned values with (void).

    * TODO:  Update TODO list

    Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-03 12:36:24 -03:00
Gregory Nutt
677b0bf47e Remove all support for the ancient Pascal compiler and pcode interpreter. 2019-11-21 06:58:38 -06:00
Gregory Nutt
118d611a8b Squashed commit of the following:
board/boarctl.c:  Add support for the new BOARDIOC_ROMDISK command.  This allows applications to create ROMFS block drivers without illegal direct calls to romdisk_register.

    include/sys/boardctl.h:  Add basic definitions to support a ROM disk creation boardctl() command.
2019-10-26 13:42:40 -06:00
Gregory Nutt
07edaa088c drivers/Kconfig: Add an option, CONFIG_DRVR_MKRD, to control whether or not the mkrd() implementation is build. Otherwise, if mkrd() is built unconditionally, it will be drawn into every build whether it is used or not and will increase the build size. 2019-10-26 11:43:34 -06:00
Gregory Nutt
03bf18d097 drivers/mkrd.c: Forgot to add file in last commit. 2019-10-26 10:24:04 -06:00
Nathan Hartman
46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Juha Niskanen
ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Gregory Nutt
e2949d0dcf boards/arm/stm32/axoloti, omnibusf4, and stm32f4discovery: If CONFIG_SCHED_CRITMONITOR is selected, then make sure that ITM and DWT resources are enabled before accessing ITM and DWT registers. By default, these registers are disabled. Suggested by Juha Niskanen. 2019-09-13 07:22:00 -06:00
Gregory Nutt
254a906409 libs/libc/builtin/: builtint_isavail() should not set the errno variable because this functions may be used by internal OS logic for which setting the rrno variable would be inappropriate. 2019-09-11 12:37:29 -06:00
Gregory Nutt
13fd8e27b6 Update TODO list 2019-08-24 16:42:00 -06:00
Gregory Nutt
a2d8e108a6 libs/libc/Kconfig: Correct a typo in Kconfig file. 2019-08-23 11:07:09 -06:00
Gregory Nutt
ac36b1de3b Update TODO list 2019-08-18 06:46:20 -06:00
Gregory Nutt
240926c995 Beginning to update comments to reflect new organization of the boards/ sub-directory. 2019-08-08 08:46:54 -06:00
Gregory Nutt
e12c133a53 Change references to boards/<board>/<config> to boards/<board>/configs/<config> in comments, Documentation, URLs. 2019-08-05 10:16:02 -06:00
Gregory Nutt
615c0ea7ee Change naming configs/ to boards in comments, Documentation, etc. Still a few more to go. 2019-08-05 07:13:48 -06:00
Gregory Nutt
de5a6163d5 This commit implements a proper version of SO_LINGER. Not sufficiently tested on initial commit.
Squashed commit of the following:

    net/: Fix some naming inconsistencies, Fix final compilation issies.

    net/inet/inet_close():  Now that we have logic to drain the buffered TX data, we can implement a proper lingering close.

    net/inet,tcp,udp:  Add functions to wait for write buffers to drain.

    net/udp:  Add support for notification when the UDP write buffer becomes empty.

    net/tcp:  Add support for notification when the TCP write buffer becomes empty.
2019-07-01 12:25:32 -06:00
Gregory Nutt
5e36627366 Update TODO list and fix an error in conditional compilation that I introduced with the last commit. 2019-07-01 08:12:51 -06:00
Gregory Nutt
5af5fc4409 net/inet/inet_close.c: Last PR remove SO_LINGER socket option. SO_LINGER was always enabled is CONFIG_NET_SOLINGER was selected. 2019-07-01 07:37:41 -06:00
Gregory Nutt
aa18720d14 Upate a README 2019-05-31 07:27:15 -06:00
Gregory Nutt
129d4d1e3c configs: Update all configurations to account for the configuration changes resulting from the separation of network initialization logic from NSH. 2019-04-29 10:03:41 -06:00
Gregory Nutt
10b73fde9d graphics/: Correct logic for copy of bit maps with resolution less than 8 bits from the per-window framebuffer to the device. 2019-03-18 09:45:09 -06:00
Gregory Nutt
9a97eb0fcf This commit brings the per-framebuffer logic to code-complete. Still untested.
Squashed commit of the following:

    Update TODO list

    graphics/nxbe:  The moverectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe:  The filltrapezond renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe:  The getrectangle method now returns data from the per-window framebuffer if available.

    graphics/nxbe:  The fillrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxmu:  If a window supports a per-window framebuffer, then redraw callbacks are suppressed and the device content is updated from the shadow, per-window framebuffer.  graphics/nxbe:  The copyrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe/nxbe_setsize.c:  Reallocate the per-window framebuffer when the window size changes.
2019-03-15 12:15:33 -06:00
Gregory Nutt
bd6b05f5bb Update TODO and some comments. 2019-03-10 07:25:45 -06:00
Gregory Nutt
9f4ac58054 Update README file and TODO list. 2019-03-09 11:19:00 -06:00
Gregory Nutt
2d4ce4e047 graphics/nxterm and configs/open1788: Various fixes to get the NxTerm example working in PROTECTED mode with the Open1788 knxterm configuration. Basically works until the screen becomes full and it starts scrolling. Then characters are missing from the display. Needs more debug and test. 2019-03-07 15:57:34 -06:00
Gregory Nutt
aca114d895 configs/boardctl.c: Add boardctl() commands to replace direct calls to nxterm_redraw() and nxterm_kbdin(). 2019-03-06 15:21:29 -06:00
Gregory Nutt
56b5b9f7ad graphics/nxterm: Remove the nxterm_unregister interface. The correct way to unregister a device is to unlink it. 2019-03-06 10:16:47 -06:00