On 1/18/24 15:36, Alice Ryhl wrote: > 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@xxxxxxxxxxxxxx/ > Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx> > --- Reviewed-by: Benno Lossin <benno.lossin@xxxxxxxxx> -- Cheers, Benno