nuttx
nuttx copied to clipboard
fs/mmap/msync: support msync and fix minor issue
Summary
fs/mmap/msync: support msync and fix some minor issue
Follow: https://man7.org/linux/man-pages/man2/msync.2.html
Impact
Support msync
Testing
Ci
- don't you need to distinguish MAP_SHARED/MAP_PRIVATE? copy-on-write mapping should not be written back to the file.
- don't you need some reference counting on the file? i guess the file can be closed immediately after mmap.
- i guess mmap should not modify file offset. (not specific to this PR)
@Donny9 we can implement with the new mmap infrastructure which is simpler now: https://github.com/apache/nuttx/pull/8000 and https://github.com/apache/nuttx/pull/8026.