summaryrefslogtreecommitdiff
path: root/drivers/android/node.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rust: rename `Ref` to `Arc`Wedson Almeida Filho2022-10-051-17/+17
| | | | | | | | | | | When `Ref` was first introduced, we still had `alloc`'s `Arc` being used in the codebase, so we chose a different name. Now that `Arc` is gone, we can reclaim the name, which is desirable because it is consistent with userspace. This is a pure refactor with no functional changes intended. Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
* rust: simplify lock guards by using marker typesWedson Almeida Filho2022-01-171-6/+6
| | | | | | | | | | | | | | Unify `Guard` and `GuardMut` into a single type parametrised by a marker. The new guard implementation is the same as the existing `Guard` except that if the marker is `WriteLock`, it also implements `DerefMut` (which was only implemented by `GuardMut` previously). This is in preparation for adding abstractions for read/write locks, which means that a single lock primitive needs to implement the `Lock` primitive in both shared and mutable modes, which is enabled by this change as well. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* android: rust: use `pub(crate)`Miguel Ojeda2021-11-251-1/+1
| | | | Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
* rust: rename `Guard` to `GuardMut`.Wedson Almeida Filho2021-10-151-6/+6
| | | | | | | | | | | This is in preparation for the introduction of `Guard`, which won't implement `DerefMut`. It will be used in sequence locks where the protected data cannot be directly modified because it can be accessed concurrently by readers. This is a pure refactor with no functional changes intended. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* binder: remove all usages of `Arc`.Wedson Almeida Filho2021-10-141-13/+13
| | | | | | This allows `Arc` to be removed from the `kernel` and `alloc` crates. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* rust: prelude: graduate `Box`, `Arc`, `Vec`, `Pin` and `Error`Miguel Ojeda2021-07-021-5/+1
| | | | Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
* binder: fix clippy warnings when rust_2018_idioms is enabled.Wedson Almeida Filho2021-07-021-5/+9
| | | | | | | These were originally disabled for drivers, enabling them caused warnings to be issued for binder. This commit fixes them. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* drivers: android: fix needless borrow Clippy warningMiguel Ojeda2021-07-021-1/+1
| | | | Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
* rust: require mutable references when initialising sync primitives.Wedson Almeida Filho2021-06-271-2/+2
| | | | | | | This prevents initialising synchronisation primitives when there are multiple references to them. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* drivers: binder: clean `unsafe_op_in_unsafe_fn` warningMiguel Ojeda2021-06-041-6/+8
| | | | Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
* binder: Store node flags on creation.Wedson Almeida Filho2021-05-281-1/+3
| | | | | | | We'll need these flags to determine if a node allows file descriptors to be transferred through them. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* Rename `KernelResult` to just `Result`.Wedson Almeida Filho2021-05-111-11/+3
| | | | | | | This is just a rename followed by `rustfmt`, no functional change is intended. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* Introduce a new `io_buffer` module.Wedson Almeida Filho2021-04-271-0/+1
| | | | | | | | | It abstracts buffers involved in IO. This is in preparation for allowing drivers to implement `write_iter` and `read_iter`. No behaviour change is intended, this is a pure refactor. Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
* Move list implementation to `kernel` crate.Wedson Almeida Filho2021-04-141-1/+1
|
* Preview of Binder IPC driver in Rust.Wedson Almeida Filho2021-04-111-0/+479