]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust: task: make Pid type alias public
authorAlice Ryhl <aliceryhl@google.com>
Thu, 30 Jan 2025 11:21:38 +0000 (11:21 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 6 Mar 2025 19:59:45 +0000 (20:59 +0100)
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>
rust/kernel/task.rs

index 07bc22a7645c0c7d792a0a163dd55b8ff0fe5f92..49012e7119425d64426a4e0039bd2be5bba3f6da 100644 (file)
@@ -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)]