Il 7 ottobre 2026 12:59:46 UTC, Nam Cao <[email protected]> ha scritto:
>Gabriele Monaco <[email protected]> writes:
>> Add bpf_atomic.h including atomic read/write macros like READ_ONCE() and
>> try_cmpxchg(). This version is a stripped down copy of the one currently
>> present in selftests/bpf/libarena.
>
>Instead of this, what do you think about using C11's atomic stuffs? I
>prefer standardized stuff when it is an option.

Mmh, I'm not too familiar with them, but they wouldn't be drop-in replacements 
as far as I understand. I'd need to use C11 atomic types and that would diverge 
further from the kernel implementation.

Ideally I wouldn't like to copy libarena's implementation but I couldn't find a 
cleaner way to include it.

I'm going to look into that more carefully though.

Thanks,
Gabriele


Reply via email to