8000 Rename `LeasableBuffer` to `SubSlice` by bradjc · Pull Request #3519 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Rename LeasableBuffer to SubSlice #3519

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

Merged
merged 4 commits into from
Jul 25, 2023
Merged

Rename LeasableBuffer to SubSlice #3519

merged 4 commits into from
Jul 25, 2023

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented Jun 27, 2023

Pull Request Overview

This pull request renames the LeasableBuffer type to Splice SubSlice and the LeasableMutableBuffer type to SpliceMut SubSliceMut. This is part of #3504.

Why rename?

kernel::leasable_buffer::LeasableBuffer is clunky to use, hard to type/spell, and doesn't provide enough connection to why its useful. I propose that changing its name to be a riff on "slice" makes it easier to use throughout Tock, akin to how TakeCell is ubiquitous in Tock despite not being a Rust core type.

Why "splice"?

Mostly because it sounds like slice. It's also short and maybe catchy. Also, I think a splice (say in a wire) is reminiscent of a what a leasable buffer does: let you edit within a larger object.

Why "subslice"?

Discussion seemed to suggest this name was acceptable.

What about "leasable buffer"?

I propose we retain the "leasable buffer" terminology to describe the general idea of a buffer that decouples the underlying buffer memory from the current view of that buffer. SubSlice is just one concrete implementation of a leasable buffer. Much like how Roundnet is a game, while Spikeball is one company that sells supplies for the game.

Testing Strategy

todo

TODO or Help Wanted

So far I've only changed the content of the leasable_buffer.rs file. I want to get a sense of if we want to go forward with this before changing the name of the file and all current uses of LeasableBuffer.

Documentation Updated

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

Formatting

  • Ran make prepush.

alistair23
alistair23 previously approved these changes Jun 28, 2023
@bradjc bradjc mentioned this pull request Jun 29, 2023
2 tasks
@bradjc bradjc force-pushed the leasable-buffer-update branch from 83944be to 351fd2c Compare July 2, 2023 12:56
@bradjc bradjc changed the title Rename LeasableBuffer to Splice Rename LeasableBuffer to ~~Splice~~ SubSlice Jul 2, 2023
@bradjc bradjc changed the title Rename LeasableBuffer to ~~Splice~~ SubSlice Rename LeasableBuffer to SubSlice Jul 2, 2023
hudson-ayers
hudson-ayers previously approved these changes Jul 10, 2023
alistair23
alistair23 previously approved these changes Jul 10, 2023
brghena
brghena previously approved these changes Jul 14, 2023
@phil-levis
Copy link
Contributor

I support the new name.

phil-levis
phil-levis previously approved these changes Jul 14, 2023
@bradjc bradjc dismissed stale reviews from phil-levis, brghena, alistair23, and hudson-ayers via b13b965 July 17, 2023 15:10
@bradjc bradjc force-pushed the leasable-buffer-update branch from 351fd2c to b13b965 Compare July 17, 2023 15:10
@github-actions github-actions bot added sam4l Change pertains to the SAM4L MCU. HIL This affects a Tock HIL interface. WG-OpenTitan In the purview of the OpenTitan working group. component labels Jul 17, 2023
@bradjc
Copy link
Contributor Author
bradjc commented Jul 17, 2023

Added a commit to do the rename in the Tock tree.

Blocked on #3503

@ppannuto
Copy link
Member

Updated to latest master. Rebase got ugly, so I went with a plain merge.

ppannuto
ppannuto previously approved these changes Jul 19, 2023
@ppannuto ppannuto mentioned this pull request Jul 19, 2023
2 tasks
alistair23
alistair23 previously approved these changes Jul 20, 2023
@bradjc bradjc dismissed stale reviews from alistair23 and ppannuto via 43ad015 July 25, 2023 12:50
@bradjc bradjc force-pushed the leasable-buffer-update branch from 3d9d964 to 43ad015 Compare July 25, 2023 12:50
ppannuto
ppannuto previously approved these changes Jul 25, 2023
@ppannuto ppannuto added this pull request to the merge queue Jul 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jul 25, 2023
@ppannuto
Copy link
Member

Rebased again..., just one small/easy conflict this time at least

@ppannuto ppannuto enabled auto-merge July 25, 2023 22:25
@ppannuto ppannuto added this pull request to the merge queue Jul 25, 2023
Merged via the queue into master with commit 55491ad Jul 25, 2023
@ppannuto ppannuto deleted the leasable-buffer-update branch July 25, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component HIL This affects a Tock HIL interface. kernel sam4l Change pertains to the SAM4L MCU. WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0