Files
linux/rust/kernel
Alice Ryhl 913f8cf4f3 rust: task: add Task::current_raw
Introduces a safe function for getting a raw pointer to the current
task.

When writing bindings that need to access the current task, it is often
more convenient to call a method that directly returns a raw pointer
than to use the existing `Task::current` method. However, the only way
to do that is `bindings::get_current()` which is unsafe since it calls
into C. By introducing `Task::current_raw()`, it becomes possible to
obtain a pointer to the current task without using unsafe.

Link: https://lore.kernel.org/all/CAH5fLgjT48X-zYtidv31mox3C4_Ogoo_2cBOCmX0Ang3tAgGHA@mail.gmail.com/
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20240915-alice-file-v10-2-88484f7a3dcf@google.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-09-30 13:02:28 +02:00
..
2024-08-23 06:25:59 +02:00
2024-08-23 06:26:57 +02:00
2024-09-30 13:02:27 +02:00
2024-07-08 23:44:01 +02:00
2023-05-31 17:35:03 +02:00
2024-08-23 06:25:59 +02:00
2023-12-21 20:54:17 +01:00
2024-08-23 06:26:57 +02:00
2024-07-08 23:44:01 +02:00
2024-09-04 23:11:31 +02:00
2024-05-05 19:22:25 +02:00
2024-09-30 13:02:28 +02:00
2024-09-30 13:02:27 +02:00