Re: [PATCH v4 0/3] rust: Add pr_*_once macros

From: jens . korinth
Date: Tue Feb 11 2025 - 10:30:19 EST


Hi!

> Thanks for the patch! Do you plan on sending a new version? If not, do you mind if I send v5?

I think there is currently no consensus on how exactly it should be done (or at least I was confused about that). If you’re actively using the patch please go ahead! Active usage is always the best argument in such cases.

Jens
11 Feb 2025 at 16:05 by a.hindborg@xxxxxxxxxx:

> Hi Jens,
>
> "Jens Korinth via B4 Relay" <devnull+jens.korinth.tuta.io@xxxxxxxxxx> writes:
>
>> Add Rust version of pr_[emerg|alert|crit|err|warn|notic|info]_once
>> functions, which print a message only once.
>>
>> Introduces a `OnceLite` abstraction similar to Rust's
>> [`std::sync::Once`](https://doc.rust-lang.org/std/sync/struct.Once.html)
>> but using the non-blocking mechanism from the kernel's `DO_ONCE_LITE`
>> macro, which is used to define the `do_once_lite` Rust macro.
>>
>> First use case are an implementation of `pr_*_once` message macros to
>> print a message only once.
>>
>
> Thanks for the patch! Do you plan on sending a new version? If not, do
> you mind if I send v5?
>
>
> Best regards,
> Andreas Hindborg
>
>