Re: [PATCH v2 03/13] rust: lock: introduce `Mutex`

From: Miguel Ojeda
Date: Thu Apr 06 2023 - 12:46:13 EST


On Wed, Apr 5, 2023 at 10:49 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Oh man, that's sad, I was hoping it would write the equivalent inline
> function in rust.

Some of us hope Rust would directly handle importing C headers, so
avoiding the intermediate step, like a few languages support.

> But yeah, feel free to convert macros to inline functions where the
> difference is moot. There is indeed no real reason for mutex_lock() to
> not be an inline function in that case.

We initially minimized changes on the C side on purpose, but if
maintainers are OK with that (modulo exceptions), it would be great.

Cheers,
Miguel