HomeFreeBSD

linuxkpi: spinlock: Simplify code

Description

linuxkpi: spinlock: Simplify code

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

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

(cherry picked from commit ae38a1a1bfdf320089c254e4dbffdf4769d89110)

linuxkpi: Fix spin_lock_init

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

Reported by: David Wolfskill <david@catwhisker.org>
Fixes: ae38a1a1bfdf ("linuxkpi: spinlock: Simplify code")

(cherry picked from commit cff79fd02636f34010d8b835cc9e55401fa76e74)

Details

Provenance
manuAuthored on May 15 2024, 9:00 AM
Reviewer
bz
Differential Revision
D45205: linuxkpi: spinlock: Simplify code
Parents
rGf285eabc89ce: Bump __FreeBSD_version after linuxkpi_video module is built
Branches
Unknown
Tags
Unknown