From: Fiona Behrens <me@kloenk.dev>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: task: make Pid type alias public
Date: Thu, 30 Jan 2025 12:33:07 +0100 [thread overview]
Message-ID: <875xlwfsek.fsf@kloenk.dev> (raw)
In-Reply-To: <20250130-task-pid-pub-v1-1-508808bcfcdc@google.com> (Alice Ryhl's message of "Thu, 30 Jan 2025 11:21:38 +0000")
Alice Ryhl <aliceryhl@google.com> writes:
> 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>
> ---
> rust/kernel/task.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)]
>
> ---
> base-commit: ceff0757f5dafb5be5205988171809c877b1d3e3
> change-id: 20250130-task-pid-pub-484458aec19b
>
> Best regards,
next prev parent reply other threads:[~2025-01-30 11:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 11:21 [PATCH] rust: task: make Pid type alias public Alice Ryhl
2025-01-30 11:33 ` Fiona Behrens [this message]
2025-03-06 20:04 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xlwfsek.fsf@kloenk.dev \
--to=me@kloenk.dev \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.