HomeFreeBSD

Microoptimize locking primitives by avoiding unnecessary atomic ops.

Description

Microoptimize locking primitives by avoiding unnecessary atomic ops.

Inline version of primitives do an atomic op and if it fails they fallback to
actual primitives, which immediately retry the atomic op.

The obvious optimisation is to check if the lock is free and only then proceed
to do an atomic op.

Reviewed by: jhb, vangyzen

Details

Provenance
mjgAuthored on
Reviewer
jhb
Parents
rS301156: MFC r300706
Branches
Unknown
Tags
Unknown