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: implement == operator for Task

It's useful to compare if two tasks are the same task or not. Rust
Binder wants this to check if a certain task is equal to the group
leader of current.

Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260324-close-fd-check-current-v3-2-b94274bedac7@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alice Ryhl and committed by
Greg Kroah-Hartman
12c68808 18e9fafb

+9
+9
rust/kernel/task.rs
··· 362 362 } 363 363 } 364 364 365 + impl PartialEq for Task { 366 + #[inline] 367 + fn eq(&self, other: &Self) -> bool { 368 + ptr::eq(self.as_ptr(), other.as_ptr()) 369 + } 370 + } 371 + 372 + impl Eq for Task {} 373 + 365 374 impl Kuid { 366 375 /// Get the current euid. 367 376 #[inline]