[PATCH v4 0/2] rust: Add Lock::from_raw() and expose Guard::new()

Lyude Paul posted 2 patches 1 year, 2 months ago
rust/kernel/sync/lock.rs | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
[PATCH v4 0/2] rust: Add Lock::from_raw() and expose Guard::new()
Posted by Lyude Paul 1 year, 2 months ago
This is the third version of a small patch series to introduce
interfaces for working with locks that we've acquired from raw C
pointers, something that is quite useful for bindings like the rust
bindings - where there's a number of interfaces protected by BFLs, or
which require the implementation of callbacks that are known to occur
under lock.

Lyude Paul (2):
  rust: sync: Add Lock::from_raw() for Lock<(), B>
  rust: sync: Make Guard::new() public

 rust/kernel/sync/lock.rs | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)


base-commit: b2603f8ac8217bc59f5c7f248ac248423b9b99cb
-- 
2.47.0
Re: [PATCH v4 0/2] rust: Add Lock::from_raw() and expose Guard::new()
Posted by Boqun Feng 1 year, 2 months ago
On Tue, Nov 19, 2024 at 06:11:02PM -0500, Lyude Paul wrote:
> This is the third version of a small patch series to introduce
> interfaces for working with locks that we've acquired from raw C
> pointers, something that is quite useful for bindings like the rust
> bindings - where there's a number of interfaces protected by BFLs, or
> which require the implementation of callbacks that are known to occur
> under lock.
> 

Queued for future tests and reviews, thanks!

Regards,
Boqun

> Lyude Paul (2):
>   rust: sync: Add Lock::from_raw() for Lock<(), B>
>   rust: sync: Make Guard::new() public
> 
>  rust/kernel/sync/lock.rs | 25 ++++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 
> 
> base-commit: b2603f8ac8217bc59f5c7f248ac248423b9b99cb
> -- 
> 2.47.0
>