On Tue, Jun 24, 2025 at 08:10:56PM -0700, Boqun Feng wrote:

> +static void ref_shazptr_wc_read_section(const int nloops)
> +{
> +     int i;
> +
> +     for (i = nloops; i >= 0; i--) {
> +             preempt_disable();
> +             {
> +                     guard(shazptr)(ref_shazptr_read_section);
> +                     /* Trigger wildcard logic */
> +                     guard(shazptr)(ref_shazptr_wc_read_section);
> +             }
> +             preempt_enable();
> +     }
> +}
> +
> +static void ref_shazptr_wc_delay_section(const int nloops, const int udl, 
> const int ndl)
> +{
> +     int i;
> +
> +     for (i = nloops; i >= 0; i--) {
> +             preempt_disable();
> +             {
> +                     guard(shazptr)(ref_shazptr_delay_section);
> +                     /* Trigger wildcard logic */
> +                     guard(shazptr)(ref_shazptr_wc_delay_section);
> +                     un_delay(udl, ndl);
> +             }
> +             preempt_enable();
> +     }
> +}

Same as the last one, scoped_guard (preempt) can replace the preempt
things and the scope.

Reply via email to