| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
NuttX has standard posix_spawn interface, and can be used with it.
* https://nuttx.apache.org/docs/12.0.0/reference/user/01_task_control.html#c.posix_spawn
|
|
|
| |
NuttX supports accept4 since https://github.com/apache/nuttx/commit/48c9d1033659603663f6e35587cf27045a130e0d
|
|
|
|
|
| |
* Fix: make nintendoswitch someGcc, remove symlink support for nintendoswitch, add getAppFilename for nintendoswitch
* Fix: use getApplHeuristic on nintendoswitch
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ioselectors: ioselectors_epoll: for NuttX, limit initial numFD to configured value.
In the NuttX build config, there is a setting called "FS_NEPOLL_DESCRIPTORS".
--------
config FS_NEPOLL_DESCRIPTORS
int "Maximum number of default epoll descriptors for epoll_create1(2)"
default 8
---help---
The maximum number of default epoll descriptors for epoll_create1(2)
--------
For NuttX, change the number of fd arrays allocated by newSelector() to that value.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
|
|
|
|
|
|
|
| |
codes. (#21385)
async: NuttX added supports getrlimit(RLIMIT_NOFILE), so remove NuttX-specific codes.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add general purpose `setFileSize` (unexported for now). Use to simplify
`memfiles.open` as well as make robust (via hard allocation, not merely
`ftruncate` address space allocation) on systems with `posix_fallocate`.
As part of this, fix a bad `closeHandle` return check bug on Windows and
add `MemFile.resize` for Windows now that setFileSize makes that easier.
* Adapt existing test to exercise newly portable `MemFile.resize`.
* Since Apple has never provided `posix_fallocate`, provide a fallback.
This is presently written in terms of `ftruncate`, but it can be
improved to use `F_PREALLOCATE` instead, as mentioned in a comment.
|
| |
|
|
|
|
|
| |
* Remove deprecated CLONE_STOPPED
* Remove deprecated CLONE_STOPPED
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix =#13790 ptr char (+friends) should not implicitly convert to cstring
* Apply suggestions from code review
* first round; compiles on windows
* nimPreviewSlimSystem
* conversion is unsafe, cast needed
* fixes more tests
* fixes asyncnet
* another try another error
* last one
* true
* one more
* why bugs didn't show at once
* add `nimPreviewCstringConversion` switch
* typo
* fixes ptr to cstring warnings[backport]
* add fixes
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix posix.mq_receive compilation with cpp backend
* only enable runnableExample on posix
* linux, not posix
* simplify example
* add test
* mqueue.h does not exist on MacOS
* place test case in own block
* drop runnableExamples
|
|
|
|
|
|
|
| |
* fixes #20526; use `nimPreviewSlimSystem` for `koch docs`
* fixes documentation errors
* fixes remaning issues
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement Markdown indented code blocks
Additional indentation of 4 spaces makes a block an "indented code block"
(monospaced text without syntax highlighting).
Also `::` RST syntax for code blocks is disabled.
So instead of
```rst
see::
Some code
```
the code block should be written as
```markdown
see:
Some code
```
* Migrate RST literal blocks :: to Markdown's ones
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* system refactor, move out 600 lines
* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings
* make exceptions an import, old ops to misc_num
* move instantiationInfo back
* move back nim version, fix windows echo
* include compilation
* better docs for imported modules, fix unsigned ops
also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem
* fix terminal
* workaround IC test & weird csize bug, changelog
* move NimMajor etc back to compilation, rebase for CI
* try ic fix
* form single `indices`, slim out TaintedString, try fix IC
* fix CI, update changelog, addQuitProc
* fix CI
* try fix CI
* actually fix CI finally hopefully
* Update lib/system/compilation.nim
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* update kochdocs
* hopefully fix csize uses for slimsystem
* fix tquit
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
* Fix issue with fields trying to use wrong name
* Fix similar issue in winlean
* Revert accidental csize change
Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
* epoll: correct mapping
`epoll_data` is a union and `epoll_event` is packed on `amd64`
* names
|
| |
|
|
|
|
|
| |
* Remove deprecated posix proc that takes wrong argument types
* Remove deprecated posix proc that takes wrong argument types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* enable style:usages for stdlib tests
* freeAddrInfo
* more tests
* importc
* bufSize
* fix more
* => parseSql and renderSql
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* move io out of system
* fix tests
* fix tests
* next step
* rename to syncio
* rename
* fix nimscript
* comma
* fix
* fix parts of errors
* good for now
* fix test
|
|
|
| |
Co-authored-by: Jaremy J. Creechley <jaremy.creechley@panthalassa.com>
|
|
|
|
|
| |
* add compile time option for POSIX sigwait on Illumos/Solaris
* fix link to documentation of `sigwait` on Illumos/Solaris
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Variant of that works with raw IpAddresses.
- Add doc tests for new net proc's.
- Aadd recvFrom impl
- Add recvFrom impl -- tweak handling data var
- Update lib/pure/net.nim
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
- cleaning up sendTo args
- remove extra connect test
- cleaning up sendTo args
- fix inet_ntop test
- fix test failing - byte len
* fix test failing - byte len
* debugging odd windows build failure
* debugging odd windows build failure
* more experiments to figure out the windows failure
* try manual assigment on InAddr
Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Porting Nim to run on Zephyr.
Includes changes to `std/net`.
Squashed commit of the following:
tweaking more memory / malloc things
revert back bitmasks
tweaking nim to use kernel heap as C malloc doesn't work
fixing socket polling on zephyr
cleanup getting maximum sockets for process or for rtos'es
reorganizing and fixing net for async / system
merge netlite changes back into nativesockets
merge netlite changes back into nativesockets
reverting native sockets back
tweaking nim / zephyr network
adding option to run 'net-lite' from linux
bridging zephyr's max connections
fixing net errors
fixing compilation with getAddrString
fixing compilation with getAddrString
experimenting with a nativesockets_lite ... getAddrString
experimenting with a nativesockets_lite ... getAddrString
experimenting with a nativesockets_lite ... getLocalAddr
experimenting with a nativesockets_lite ... getLocalAddr
experimenting with a nativesockets_lite ...
add note regarding incorrect FreeRTOS Sockadd_in fields
changing to NIM_STATIC_ASSERT
cleaning up the static_assert error messages
cleaning up the static_assert error messages
setting up static assert ftw!
testing compile time asserts
reworking Sockaddr objects to more closely match various platforms
reworking Sockaddr objects to more closely match various platforms
reworking Sockaddr objects to more closely match various platforms
finding missing items (issue #18684)
fixup posix constants (issue #18684)
adding plumbing for zephyr os (issue #18684)
adding plumbing for zephyr os (issue #18684)
* fixing constant capitalizations
* remove extra debug prints and fix TSa_Family/cint issue
* remove extra debug prints and fix TSa_Family/cint issue
* Porting Nim to run on Zephyr.
Includes changes to `std/net`.
Squashed commit of the following:
tweaking more memory / malloc things
revert back bitmasks
tweaking nim to use kernel heap as C malloc doesn't work
fixing socket polling on zephyr
cleanup getting maximum sockets for process or for rtos'es
reorganizing and fixing net for async / system
merge netlite changes back into nativesockets
merge netlite changes back into nativesockets
reverting native sockets back
tweaking nim / zephyr network
adding option to run 'net-lite' from linux
bridging zephyr's max connections
fixing net errors
fixing compilation with getAddrString
fixing compilation with getAddrString
experimenting with a nativesockets_lite ... getAddrString
experimenting with a nativesockets_lite ... getAddrString
experimenting with a nativesockets_lite ... getLocalAddr
experimenting with a nativesockets_lite ... getLocalAddr
experimenting with a nativesockets_lite ...
add note regarding incorrect FreeRTOS Sockadd_in fields
changing to NIM_STATIC_ASSERT
cleaning up the static_assert error messages
cleaning up the static_assert error messages
setting up static assert ftw!
testing compile time asserts
reworking Sockaddr objects to more closely match various platforms
reworking Sockaddr objects to more closely match various platforms
reworking Sockaddr objects to more closely match various platforms
finding missing items (issue #18684)
fixup posix constants (issue #18684)
adding plumbing for zephyr os (issue #18684)
adding plumbing for zephyr os (issue #18684)
* fixing constant capitalizations
* remove extra debug prints and fix TSa_Family/cint issue
* remove extra debug prints and fix TSa_Family/cint issue
* fixing PR issues
* Porting Nim to run on Zephyr.
Includes changes to `std/net`.
Squashed commit of the following:
tweaking more memory / malloc things
revert back bitmasks
tweaking nim to use kernel heap as C malloc doesn't work
fixing socket polling on zephyr
cleanup getting maximum sockets for process or for rtos'es
reorganizing and fixing net for async / system
merge netlite changes back into nativesockets
merge netlite changes back into nativesockets
reverting native sockets back
tweaking nim / zephyr network
adding option to run 'net-lite' from linux
bridging zephyr's max connections
fixing net errors
fixing compilation with getAddrString
fixing compilation with getAddrString
experimenting with a nativesockets_lite ... getAddrString
experimenting with a nativesockets_lite ... getAddrString
experimenting with a nativesockets_lite ... getLocalAddr
experimenting with a nativesockets_lite ... getLocalAddr
experimenting with a nativesockets_lite ...
add note regarding incorrect FreeRTOS Sockadd_in fields
changing to NIM_STATIC_ASSERT
cleaning up the static_assert error messages
cleaning up the static_assert error messages
setting up static assert ftw!
testing compile time asserts
reworking Sockaddr objects to more closely match various platforms
reworking Sockaddr objects to more closely match various platforms
reworking Sockaddr objects to more closely match various platforms
finding missing items (issue #18684)
fixup posix constants (issue #18684)
adding plumbing for zephyr os (issue #18684)
adding plumbing for zephyr os (issue #18684)
* fixing constant capitalizations
* remove extra debug prints and fix TSa_Family/cint issue
* remove extra debug prints and fix TSa_Family/cint issue
* Remerge
* fixing constant capitalizations
* remove extra debug prints and fix TSa_Family/cint issue
* remove extra debug prints and fix TSa_Family/cint issue
* fixing PR issues
* fix maxDescriptors on zephyr/freertos
* move maxDescriptors to selector.nim -- fixes compile issue
* change realloc impl on zephyr to match ansi c behavior
* change realloc impl on zephyr to match ansi c behavior
* force compileOnly mode for tlwip
Co-authored-by: Jaremy J. Creechley <jaremy.creechley@wavebaselabs.com>
Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
|
| |
|
| |
|
| |
|
|
|
| |
fixes https://github.com/timotheecour/Nim/issues/739
|
|
|
|
|
|
|
|
|
|
|
| |
tempfiles.createTempFile (#17889)
* fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile
* fix for tests/async/tasyncfile.nim
* hide mode for now
* add notice regarding stability
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* stdlib/os: handle symlinks in copy/move functions
- Added optional `options` argument to `copyFile`, `copyFileToDir`, and
`copyFileWithPermissions`. By default, symlinks are followed (copy files
symlinks point to).
- `copyDir` and `copyDirWithPermissions` copy symlinks as symlinks (instead of
skipping them as it was before).
- `moveFile` and `moveDir` move symlinks as symlinks (instead of skipping them
sometimes as it was before).
- Added optional `followSymlinks` argument to `setFilePermissions`.
See also: https://github.com/nim-lang/RFCs/issues/319
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Address comments in #16709
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* Address comments in #16709 (second iteration)
Skip symlinks on Windows.
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add posix_utils.osReleaseFile
* Update lib/posix/posix_utils.nim
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Update lib/posix/posix_utils.nim
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
* Add a basic sanity test
* Add a basic sanity test
* Add a basic sanity test
* Add a basic sanity test
* https://github.com/nim-lang/Nim/pull/16452#issuecomment-753364096
* Update lib/posix/posix_utils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Update lib/posix/posix_utils.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Update changelog.md
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
| |
Sync between Linux kernel code (header:
https://github.com/torvalds/linux/blob/master/tools/include/uapi/linux/sched.h)
and the linux module in lib.
`CLONE_STOPPED` was marked as deprecated, as it was removed in the
Linux kernel upstream.
Fixes #12958.
|
|
|
|
| |
This reverts commit 0f7f159a35bc10a43ff15bcb6c20eefdc574138e.
|
|
|
|
|
|
|
|
|
| |
* fix #15623
* add testcase for #15623
* fix
* add testcase
|
|
|
|
|
|
|
|
| |
* Fixing issue #15302 -- lwip doesn't support signals
* Adding test to catch issue #15302 -- lwip/freertos net library
don't try to build / run on windows, it'll compile only but not run
Fixing issue #15302 -- reworking test to compile on other platforms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Changes for FreeRTOS/LwIP Port for the ESP32 (ESP-IDF)
Adding FreeRTOS/LwIP to compiler:
* adding freertos option
* dyncalls for freertos
* add freertos to posix os list
* adding lwip option
Setting up networking FreeRTOS/LwIP Port:
* setting up lwip network for freertos
* fixing posix / networking for freertos
* disable setInheritable for freerots
* using lwip for net control items
* Fix builds by ignoring lib/posix/posix_freertos_consts.nim similar to lib/posix/posix_other_consts.nim
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
client code since Linux `inotify` is much like Linux `getdents64`.
Expanding on "almost always"..The only time that this `iterator` logic
is ***not*** needed on the output of a `read` from inotify fd's is when
one passes a length to `read` *guaranteed* to only pass one event struct
in the buffer. That unusual circumstance requires (at least!) knowing
the length of the delivered filename before an event occurs, and the
filename itself is optional for some event types.
It is *far* more common to not know lengths in advance which means one
passes a buffer big enough for at least one maximum length directory
entry (256 bytes) which is then also big enough for *many* "typical"
length entries and therefore many events. In such more common scenarios
this iterator logic is definitely needed.
Further, not using this logic, yet treating the return from read as "the
whole answer" can test ok on "thin" event streams (e.g. 1 event per ms),
hiding a latent bug of processing only the first event.
|