Page MenuHomeFreeBSD

LinuxKPI: Fix atomic_dec_and_lock_irqsave function
ClosedPublic

Authored by wulf on Jun 16 2021, 12:24 AM.

Details

Summary

On Linux atomic_dec_and_lock_irqsave is a wrapper macro which provides
a reference to third parameter rather than parameter value itself to
implementation routine called _atomic_dec_and_lock_irqsave [1].

While here, add fast path to implementation [2].

[1] https://github.com/torvalds/linux/blob/master/include/linux/spinlock.h#L476
[2] https://github.com/torvalds/linux/blob/master/lib/dec_and_lock.c#L41

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.