Re: [PATCH v2 0/5] In-place module initialisation

From: Miguel Ojeda
Date: Mon Apr 22 2024 - 20:43:27 EST


On Thu, Mar 28, 2024 at 8:55 PM Wedson Almeida Filho <wedsonaf@xxxxxxxxx> wrote:
>
> From: Wedson Almeida Filho <walmeida@xxxxxxxxxxxxx>
>
> Introduce `InPlaceModule`, which allows modules to be initialised
> inplace, as opposed to the current state where modules must return an
> instance which is moved to its final memory location.
>
> This allows us to have modules whose state hold objects that must be
> initialised inplace like locks. It also allows us to implement
> registrations (e.g., driver registration) inplace and have them similar
> to their C counterparts where no new allocations are needed.
>
> This is built on top of the allocation APIs because the sample module is
> a modified version of rust_minimal, which would be incompatible with the
> allocation API series because it uses vectors.

For the moment, applied 1/5 and 2/5 to `rust-fixes` (tagged for stable
too) -- thanks everyone!

Cheers,
Miguel