Page MenuHomeFreeBSD

LinuxKPI: add scoped_guard(), spinlock guard support
Needs ReviewPublic

Authored by bz on Tue, Jan 20, 11:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 22, 5:30 PM
Unknown Object (File)
Thu, Jan 22, 6:17 AM
Unknown Object (File)
Wed, Jan 21, 11:20 PM
Unknown Object (File)
Wed, Jan 21, 11:40 AM
Unknown Object (File)
Wed, Jan 21, 9:57 AM
Unknown Object (File)
Wed, Jan 21, 9:15 AM
Unknown Object (File)
Wed, Jan 21, 9:03 AM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

The "cleanup.h" implementation got a bit more complicated.

For one we now use a macro to concatenate a prefix, the name, and a
suffix for variable and function declarations. This was triggered
by the fact that the "guard_" prefix we used was confusing. We now
use a generic "cleanup_" which is only encoded in the single place
rather than all over the file.

As already indicated by the comment the DEFINE_LOCK_GUARD_0()
macro got split up and a _1 version which also takes a type got
implemented and is used for a spinlock variant used by rtw89(4)
via the new scoped_guard() bits.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70033
Build 66916: arc lint + arc unit