HomeFreeBSD

Wrap mutex(9), rwlock(9) and sx(9) macros into __extension__ ({})

Description

Wrap mutex(9), rwlock(9) and sx(9) macros into extension ({})
instead of do {} while (0).

This makes them real void expressions, and they can be used anywhere
where a void function call can be used, for example in a conditional
operator.

Reviewed by: kib, mjg
Differential revision: https://reviews.freebsd.org/D32696

Details

Provenance
glebiusAuthored on Oct 27 2021, 5:33 PM
Reviewer
kib
Differential Revision
D32696: Make mutex/rwlock/sx operation true voids
Parents
rG63d24336fd1a: Fix off-by-one error in msdosfs FAT32 volume label copying
Branches
Unknown
Tags
Unknown