Skip to content

Conversation

@kkebo
Copy link
Contributor

@kkebo kkebo commented Mar 27, 2025

I added implementation of fd_datasync following fd_sync #180.

  • On Darwin
    • behaves exactly like fd_sync (fcntl(fd, F_FULLFSYNC))
  • On Windows
    • behaves exactly like fd_sync (FlushFileBuffers)
  • On UNIX-like systems except for Darwin
    • uses fdatasync(fd)
  • On other systems that don't have fdatasync (e.g. Haiku)
    • uses fsync(fd) instead

References:

@kkebo
Copy link
Contributor Author

kkebo commented Mar 27, 2025

This PR currently contains #180's commits.

@kkebo kkebo force-pushed the wasi-fd-datasync branch 2 times, most recently from 778ecd1 to 6a8ad59 Compare March 27, 2025 16:44
@kkebo kkebo force-pushed the wasi-fd-datasync branch from 6a8ad59 to 48525a7 Compare March 27, 2025 17:02
@kkebo kkebo marked this pull request as ready for review March 27, 2025 17:03
Copy link
Member

@kateinoigakukun kateinoigakukun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kateinoigakukun kateinoigakukun merged commit f2a167a into swiftwasm:main Mar 28, 2025
14 checks passed
@kkebo kkebo deleted the wasi-fd-datasync branch March 28, 2025 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants