summaryrefslogtreecommitdiff
path: root/rust/kernel/task.rs
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2025-01-30 11:21:38 +0000
committerMiguel Ojeda <ojeda@kernel.org>2025-03-06 20:59:45 +0100
commit6ad64bf91728502fe8a4d1419c0a3e4fd323f503 (patch)
tree5a6d5aa896fa4da6a500a16e6a8b789513f5617e /rust/kernel/task.rs
parent41b6a8122d888299e3e437dae3a36431e6dfd5c9 (diff)
rust: task: make Pid type alias public
The Pid type alias represents the integer type used for pids in the kernel. It's the Rust equivalent to pid_t, and there are various methods on Task that use Pid as the return type. Binder needs to use Pid as the type for function arguments and struct fields in many places. Thus, make the type public so that Binder can access it. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Fiona Behrens <me@kloenk.dev> Link: https://lore.kernel.org/r/20250130-task-pid-pub-v1-1-508808bcfcdc@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/task.rs')
-rw-r--r--rust/kernel/task.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs
index 07bc22a7645c..49012e711942 100644
--- a/rust/kernel/task.rs
+++ b/rust/kernel/task.rs
@@ -106,7 +106,7 @@ unsafe impl Send for Task {}
unsafe impl Sync for Task {}
/// The type of process identifiers (PIDs).
-type Pid = bindings::pid_t;
+pub type Pid = bindings::pid_t;
/// The type of user identifiers (UIDs).
#[derive(Copy, Clone)]