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
|
|
@ -10,7 +10,7 @@
|
|||
when defined(nimHasStyleChecks):
|
||||
{.push styleChecks: off.}
|
||||
|
||||
when defined(freertos) or defined(zephyr):
|
||||
when defined(freertos) or defined(zephyr) or defined(nuttx):
|
||||
const
|
||||
hasSpawnH = false # should exist for every Posix system nowadays
|
||||
hasAioH = false
|
||||
|
|
@ -640,6 +640,9 @@ when defined(linux) or defined(nimdoc):
|
|||
## or UDP packets. (Requires Linux kernel > 3.9)
|
||||
else:
|
||||
const SO_REUSEPORT* = cint(15)
|
||||
elif defined(nuttx):
|
||||
# Not supported, use SO_REUSEADDR to avoid compilation errors.
|
||||
var SO_REUSEPORT* {.importc: "SO_REUSEADDR", header: "<sys/socket.h>".}: cint
|
||||
else:
|
||||
var SO_REUSEPORT* {.importc, header: "<sys/socket.h>".}: cint
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue