Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jrvanwhy
Copy link
Contributor

@jrvanwhy jrvanwhy commented Dec 5, 2022

Pull Request Overview

Tock's VolatileCell originally came from the zinc.rs project. zinc.rs is no longer maintained. This updates VolatileCell by switching to the version from the vcell crate, which appears to still be maintained.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@jrvanwhy jrvanwhy requested a review from alevy December 5, 2022 23:48
@github-actions github-actions bot added the tock-libraries This affects libraries supported by the Tock project label Dec 5, 2022
Copy link
Member

@lschuermann lschuermann left a comment

Choose a reason for hiding this comment

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

Looks good to me generally.

Johnathan Van Why added 3 commits December 6, 2022 09:17
Tock's `VolatileCell` originally came from the [zinc.rs](https://github.com/hackndev/zinc) project. zinc.rs is no longer maintained. This updates `VolatileCell` by switching to the version from the [vcell](https://github.com/japaric/vcell) crate, which appears to still be maintained.

The `volatile_cell.rs` in this commit is `vcell`'s `lib.rs` with the following history comment prepended:
```
// This file was vendored into Tock. It comes from
// https://github.com/japaric/vcell, commit
// ef556474203e93b3f45f0f8cd8dea3210aa7f844, path src/lib.rs.

```
1. Remove `#![no_std]`, as that is a crate-level attribute, and `volatile_cell` is now a module inside `tock-cells`.
2. Add `#![derive(Default)]`, as Tock uses `VolatileCell::default()`.
3. Run `rustfmt`.
lschuermann
lschuermann previously approved these changes Dec 6, 2022
Copy link
Member

@lschuermann lschuermann left a comment

Choose a reason for hiding this comment

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

Thanks!

twilfredo
twilfredo previously approved these changes Dec 7, 2022
hudson-ayers
hudson-ayers previously approved these changes Dec 7, 2022
alistair23
alistair23 previously approved these changes Dec 8, 2022
@jrvanwhy
Copy link
Contributor Author

@alevy have you seen this?

@bradjc
Copy link
Contributor

bradjc commented Dec 16, 2022

Does this change anything other than the order of the methods?

Why do we want to add as_ptr()?

alevy
alevy previously approved these changes Dec 16, 2022
@jrvanwhy
Copy link
Contributor Author

Does this change anything other than the order of the methods?

It also changes the license on the code from Apache 2.0 to Apache 2.0 or MIT.

Why do we want to add as_ptr()?

We don't need as_ptr(), and I can remove it if you'd prefer.

@bradjc
Copy link
Contributor

bradjc commented Dec 16, 2022

I don't think we should add it without explaining why. I guess I would side on not adding it.

@jrvanwhy
Copy link
Contributor Author

I don't think we should add it without explaining why. I guess I would side on not adding it.

So would you like me to push a commit removing as_ptr()?

@jrvanwhy
Copy link
Contributor Author

I removed as_ptr.

@jrvanwhy
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 27, 2022

@bors bors bot merged commit 8929c65 into tock:master Dec 27, 2022
@jrvanwhy jrvanwhy deleted the vcell branch May 10, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tock-libraries This affects libraries supported by the Tock project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants