Skip to content

Convert SysCallResult to Rust and rename to SyscallResult#2808

Merged
sporksmith merged 2 commits intoshadow:mainfrom
sporksmith:syscall-result
Mar 27, 2023
Merged

Convert SysCallResult to Rust and rename to SyscallResult#2808
sporksmith merged 2 commits intoshadow:mainfrom
sporksmith:syscall-result

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions bot added the Component: Main Composing the core Shadow executable label Mar 27, 2023
@sporksmith sporksmith requested a review from stevenengler March 27, 2023 21:16
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants