summaryrefslogtreecommitdiff
path: root/rust/kernel/task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/task.rs')
-rw-r--r--rust/kernel/task.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs
index 049c8a4d45d8..38273f4eedb5 100644
--- a/rust/kernel/task.rs
+++ b/rust/kernel/task.rs
@@ -361,6 +361,15 @@ unsafe impl crate::sync::aref::AlwaysRefCounted for Task {
}
}
+impl PartialEq for Task {
+ #[inline]
+ fn eq(&self, other: &Self) -> bool {
+ ptr::eq(self.as_ptr(), other.as_ptr())
+ }
+}
+
+impl Eq for Task {}
+
impl Kuid {
/// Get the current euid.
#[inline]