Page MenuHomeFreeBSD

LinuxKPI: add scoped_guard(), spinlock guard support
ClosedPublic

Authored by bz on Tue, Jan 20, 11:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 10:45 AM
Unknown Object (File)
Tue, Feb 3, 10:48 PM
Unknown Object (File)
Sun, Feb 1, 3:35 PM
Unknown Object (File)
Fri, Jan 30, 4:37 PM
Unknown Object (File)
Mon, Jan 26, 2:16 AM
Unknown Object (File)
Sat, Jan 24, 11:25 PM
Unknown Object (File)
Sat, Jan 24, 9:40 PM
Unknown Object (File)
Sat, Jan 24, 8:55 AM
Subscribers

Details

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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Tue, Jan 20, 11:01 PM

I would love to get this in before Monday if possible. In case anyone wants to review but does not have the time, please leave a comment and I'll wait even if not reviewed.

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Feb 10, 12:49 AM
This revision was automatically updated to reflect the committed changes.