HomeFreeBSD

mtx: add mtx_spin_wait_unlocked

Description

mtx: add mtx_spin_wait_unlocked

The primitive can be used to wait for the lock to be released. Intended
usage is for locks in structures which are about to be freed.

The benefit is the avoided interrupt enable/disable trip + atomic op to
grab the lock and shorter wait if the lock is held (since there is no
worry someone will contend on the lock, re-reads can be more aggressive).

Briefly discussed with: kib

Details

Provenance
mjgAuthored on
Parents
rS329539: Provide public declarations for ofw_spibus_driver and ofw_spibus_devclass
Branches
Unknown
Tags
Unknown