-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ARef::into_raw
#1044
Comments
I'll take this one. |
Sure! Note that there currently are no instances of |
Are you currently working on it? |
Yes @Redhawk18, I've the patch ready here, which I'm planning to submit in couple of days once I complete testing of changes in |
Hi @y86-dev, I've drafted a PR for initial review. Please take a look when you can. |
Add the function `into_raw` to `ARef<T>`. This method can be used to turn an `ARef` into a raw pointer. Link: Rust-for-Linux#1044 Co-developed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Signed-off-by: Kartik Prajapati <kartikprajapati987@gmail.com>
Add the function `into_raw` to `ARef<T>`. This method can be used to turn an `ARef` into a raw pointer. Link: Rust-for-Linux#1044 Co-developed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Signed-off-by: Kartik Prajapati <kartikprajapati987@gmail.com>
The PR is sent upstream through ML https://lore.kernel.org/all/20240324231236.145086-1-vincenzopalazzodev@gmail.com/ |
Add the function `into_raw` to `ARef<T>`. This method can be used to turn an `ARef` into a raw pointer. Link: Rust-for-Linux#1044 Co-developed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Signed-off-by: Kartik Prajapati <kartikprajapati987@gmail.com>
Add the function
into_raw
toARef<T>
, the function should:ARef<T>
by value, but not run the destructor, so you need tomem::forget
theARef<T>
.NonNull<T>
or a*mut T
, figure out which one works better.Also adjust instances where
ARef
s are manually forgotten to use this new function.This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes, to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and so on. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel.
The text was updated successfully, but these errors were encountered: