Skip to content
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

Convert SysCallResult to Rust and rename to SyscallResult #2808

Merged
merged 2 commits into from
Mar 27, 2023

Conversation

sporksmith
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the Component: Main Composing the core Shadow executable label Mar 27, 2023
Copy link
Contributor

@stevenengler stevenengler left a comment

Choose a reason for hiding this comment

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

Do we construct a SyscallReturn from C at all? I don't see any, but just want to make sure we're not doing a SyscallReturn ret = { 0 }; or something that would cause issues for rust.

@sporksmith
Copy link
Contributor Author

Do we construct a SyscallReturn from C at all? I don't see any, but just want to make sure we're not doing a SyscallReturn ret = { 0 }; or something that would cause issues for rust.

Yeah, I don't think so. I created the helper functions for safely creating the union variants and switched all the constructions over to that a while ago.

I think technically SyscallReturn ret = {0} would currently be ok, since the enum tags start at 0, but would certainly be better to avoid.

@sporksmith sporksmith merged commit 9ba2b29 into shadow:main Mar 27, 2023
@sporksmith sporksmith deleted the syscall-result branch March 27, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Main Composing the core Shadow executable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants