Page MenuHomeFreeBSD

bridge: Move locking defines into if_bridge.c
ClosedPublic

Authored by kp on Feb 23 2020, 5:31 PM.

Details

Summary

The locking defines for if_bridge used to live in if_bridgevar.h, but
they're only ever used by the bridge implementation itself (in
if_bridge.c). Moving them into the .c file.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Good idea. There should be no reason for the bridge locks to be manipulated elsewhere.

This revision is now accepted and ready to land.Feb 24 2020, 5:18 AM

It seems some of these macros should be fixed to respect style(9) and use tab instead of space after #define.

In D23808#523738, @ae wrote:

It seems some of these macros should be fixed to respect style(9) and use tab instead of space after #define.

I'm planning major changes to the bridge locking, so those macros are almost certainly going to be changed anyway. Moving them is a first step, to be doubly sure that they're not used in unexpected places. (And also, because the locking strategy really should be private to the bridge code).

This revision was automatically updated to reflect the committed changes.