HomeFreeBSD

linuxkpi: rwlock: Simplify code

Description

linuxkpi: rwlock: Simplify code

Just use a typedef for rwlock_t, no need to create a useless
structure.

Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D45206

(cherry picked from commit 5c0a1923486e65cd47398e52c03cb289d6120a78)

linuxkpi: rwlock: Fix rwlock_init

Some linux code re-init some spinlock so add MTX_NEW to mtx_init.

Reported by: rlibby
Fixes: 5c0a1923486e ("linuxkpi: rwlock: Simplify code")

(cherry picked from commit a7b222db122e99f587d87eeec303c8abc9aea04e)

Details

Provenance
manuAuthored on May 15 2024, 9:05 AM
Reviewer
bz
Differential Revision
D45206: linuxkpi: rwlock: Simplify code
Parents
rG183b64dfd84a: linuxkpi: spinlock: Simplify code
Branches
Unknown
Tags
Unknown