Add support for NuttX RTOS. (#21372)
* Add support for NuttX RTOS. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * lib: pure: asyncdispatch: assign to result. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> * lib: std: typedthreads: add support for parameters to adjust Thread Stack Size. Like FreeRTOS/Zephyr, add support for following configurations. -d:nimThreadStackSize=xxxxx -d:nimThreadStackGuard=yyyy Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp> --------- Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
This commit is contained in:
parent
93e4f278a1
commit
3b9e9fd7b2
14 changed files with 52 additions and 17 deletions
|
|
@ -2024,7 +2024,7 @@ when defined(posix):
|
|||
import posix
|
||||
|
||||
when defined(linux) or defined(windows) or defined(macosx) or defined(bsd) or
|
||||
defined(solaris) or defined(zephyr) or defined(freertos):
|
||||
defined(solaris) or defined(zephyr) or defined(freertos) or defined(nuttx):
|
||||
proc maxDescriptors*(): int {.raises: OSError.} =
|
||||
## Returns the maximum number of active file descriptors for the current
|
||||
## process. This involves a system call. For now `maxDescriptors` is
|
||||
|
|
@ -2033,6 +2033,9 @@ when defined(linux) or defined(windows) or defined(macosx) or defined(bsd) or
|
|||
result = 16_700_000
|
||||
elif defined(zephyr) or defined(freertos):
|
||||
result = FD_MAX
|
||||
elif defined(nuttx):
|
||||
# The maximum number of concurrently active UDP and TCP ports.
|
||||
result = NACTIVESOCKETS
|
||||
else:
|
||||
var fdLim: RLimit
|
||||
if getrlimit(RLIMIT_NOFILE, fdLim) < 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue