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

libutils: Mmio + refactoring #198

Merged
merged 1 commit into from
Mar 9, 2019
Merged

Conversation

Orycterope
Copy link
Member

@Orycterope Orycterope commented Mar 8, 2019

Splitting up the io module in libutils in three modules:

  • mod.rs: Contains the Io trait, and ReadOnly/WriteOnly wrappers,
  • pio.rs: Contains the Port IO implementation for x86,
  • mmio.rs: New module, contains interface to a Memory Mapped IO.

@todo
Copy link

todo bot commented Mar 8, 2019

Mmio<T> UnsafeCell

Figure out if Mmio<T> should implement UnsafeCell. Does this mean that, just like atomic, write can take self by const reference only ? But is a Mmio<T> actually atomic ?
Forward all these questions to @roblabla.
Note:
see [volatile cell][https://docs.rs/vcell/0.1.0/src/vcell/lib.rs.html#18-20] and [this discussion][https://github.com/rust-lang/unsafe-code-guidelines/issues/33]


https://github.com/roblabla42/KFS/blob/06a870e091c8fb94449591a18f43acf4c029ab5e/libutils/src/io/mmio.rs#L42-L52


This comment was generated by todo based on a todo comment in 06a870e in #198. cc @Orycterope.

Splitting up the io module in libutils in three modules:

* mod.rs: Contains the Io trait, and ReadOnly/WriteOnly wrappers,
* pio.rs: Contains the Port IO implementation for x86,
* mmio.rs: New module, contains interface to a Memory Mapped IO.
@todo
Copy link

todo bot commented Mar 8, 2019

Mmio<T> UnsafeCell

Figure out if Mmio<T> should implement UnsafeCell. Does this mean that, just like atomic, write can take self by const reference only ? But is a Mmio<T> actually atomic ?
Forward all these questions to @roblabla.
Note:
see volatile cell and this discussion


https://github.com/roblabla42/KFS/blob/c0c377d444ebf19b1143a9b835b4ff9cbf44f036/libutils/src/io/mmio.rs#L42-L52


This comment was generated by todo based on a todo comment in c0c377d in #198. cc @Orycterope.

@Orycterope Orycterope changed the title libuser: Mmio + refactoring libutils: Mmio + refactoring Mar 8, 2019
Copy link
Member

@roblabla roblabla left a comment

Choose a reason for hiding this comment

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

LGTM. Memio definitely needs an UnsafeCell but we can deal with this later

@Orycterope Orycterope merged commit 32729a6 into sunriseos:master Mar 9, 2019
@todo todo bot mentioned this pull request Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants