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

Add sys module to mc-sgx-sync #39

Merged
merged 3 commits into from
Jan 30, 2023
Merged

Add sys module to mc-sgx-sync #39

merged 3 commits into from
Jan 30, 2023

Conversation

nick-mobilecoin
Copy link
Collaborator

The sys module contains a Mutex implementation for use in SGX enclaves

sync/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@jcape jcape left a comment

Choose a reason for hiding this comment

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

The code here generally seems reasonable, but is the intent to put the poison state into this structure in a later PR?

sync/src/sys/mod.rs Outdated Show resolved Hide resolved
@nick-mobilecoin
Copy link
Collaborator Author

The code here generally seems reasonable, but is the intent to put the poison state into this structure in a later PR?

Poison state happens in std::sync::mutex.rs, which comes in in #40

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2023

Codecov Report

Merging #39 (329ce0a) into main (9f2836e) will increase coverage by 23.67%.
The diff coverage is n/a.

❗ Current head 329ce0a differs from pull request most recent head 0947923. Consider uploading reports for the commit 0947923 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##             main      #39       +/-   ##
===========================================
+ Coverage   68.23%   91.91%   +23.67%     
===========================================
  Files           9        7        -2     
  Lines         318      235       -83     
===========================================
- Hits          217      216        -1     
+ Misses        101       19       -82     
Impacted Files Coverage Δ
sync/src/lib.rs
sync/src/poison.rs

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

The sys module contains a `Mutex` implementation for use in SGX enclaves
Previously the `mc-sgx-tstdc::Mutex::try_lock()` returned `Error::Busy`
for the lock being in use. Now `mc-sgx-tstdc::Mutex::try_lock()` returns
a boolean indicating if the lock was obtained and an `Err()` when there
is unexpected behavior.
Update the root module for `sync/src/sys` to match newer rust file
naming convention,
https://doc.rust-lang.org/reference/items/modules.html#module-source-filenames
@nick-mobilecoin
Copy link
Collaborator Author

@varsha888 bumping for re-review due to restack

@nick-mobilecoin
Copy link
Collaborator Author

nick-mobilecoin commented Jan 30, 2023

✅ This pull request merged successfully as part of a Graphite job
Stack job ID: rnb0zcLhVk2UL31G5ihD.
See details on graphite.dev

@nick-mobilecoin nick-mobilecoin merged commit 89336a4 into main Jan 30, 2023
@nick-mobilecoin nick-mobilecoin deleted the nick/sys-mutex branch January 30, 2023 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update rust code size/M Medium-sized PRs
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants