-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sysdeps: Add WivOS #1235
Open
StartForKiller
wants to merge
23
commits into
managarm:master
Choose a base branch
from
WivOS:wivos-work
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
sysdeps: Add WivOS #1235
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this sweep, I decided to extract all SIO* ioctl families into a common abi-bit.
Currently, the only platform providing bits/syscall.h is Linux. Linux is also the only platform whose users rely on unistd.h including <bits/syscall.h>. Precedent set by other platforms is that the syscall function is provided by the sysdep itself, and as such, this would not be a useful change. In conclusion, <bits/syscall.h> is provided on an as-wants basis, depending on platform.
Here, it is enough (maybe even excessive) to check for the Linux option, at least until the header is, for one reason or another, included in mlibc.
relying on defined()/if{,n}def is prone to typos, and might go undetected to a long time, due to possibly subtle differences
Excerpt from sys/socket.h: // Control message format: // The offsets marked with ^ are aligned to alignof(size_t). // // |---HEADER---|---DATA---|---PADDING---|---HEADER---|... // ^ ^ ^ // |---------CMSG_LEN------| // |---------------CMSG_SPACE------------| By this definition, control message header and data should both be aligned to (at least) alignof(size_t), however, previously, the implementation of these macros in options/posix relied on sizeof(struct cmsghdr) % sizeof(size_t) being zero. After the recent change to socklen_t, this no longer held true, and DATA would be aligned to a 12 byte boundary (on x86_64), and hence would move all data back a bit. Code that relied on CMSG_ALIGN() to compute sizes of cmsg data (notably, sysdeps/managarm) hence broke as a result. The change in this commit fixes that misalignment.
Co-authored-by: no92 <[email protected]>
You need to rebase. Having old commits and merge commits is a no-no in a pull request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finally after some work, WivOS is fully working on upstream.
So here is the first big commit to upstream WivOS sysdep to mlibc.