Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Alice Ryhl and committed by
Miguel Ojeda
6ad64bf9 41b6a812

+1 -1
+1 -1
rust/kernel/task.rs
··· 106 106 unsafe impl Sync for Task {} 107 107 108 108 /// The type of process identifiers (PIDs). 109 - type Pid = bindings::pid_t; 109 + pub type Pid = bindings::pid_t; 110 110 111 111 /// The type of user identifiers (UIDs). 112 112 #[derive(Copy, Clone)]