aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/bcast.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-10-22 08:51:34 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-24 06:56:25 -0700
commit0043550b0a88b72216161d6f25eb0a2e0e78babf (patch)
treec1adb7278bfe35dfa7fcf4e5b33531fca713317a /net/tipc/bcast.h
parenttipc: move bcast definitions to bcast.c (diff)
downloadlinux-dev-0043550b0a88b72216161d6f25eb0a2e0e78babf.tar.xz
linux-dev-0043550b0a88b72216161d6f25eb0a2e0e78babf.zip
tipc: move broadcast link lock to struct tipc_net
The broadcast lock will need to be acquired outside bcast.c in a later commit. For this reason, we move the lock to struct tipc_net. Consistent with the changes in the previous commit, we also introducee two new functions tipc_bcast_lock() and tipc_bcast_unlock(). The code that is currently using tipc_bclink_lock()/unlock() will be phased out during the coming commits in this series. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.h')
-rw-r--r--net/tipc/bcast.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h
index d379b0afe8e8..eac912abacd2 100644
--- a/net/tipc/bcast.h
+++ b/net/tipc/bcast.h
@@ -69,4 +69,14 @@ int tipc_nl_bc_link_set(struct net *net, struct nlattr *attrs[]);
void tipc_bclink_input(struct net *net);
void tipc_bclink_sync_state(struct tipc_node *n, struct tipc_msg *msg);
+static inline void tipc_bcast_lock(struct net *net)
+{
+ spin_lock_bh(&tipc_net(net)->bclock);
+}
+
+static inline void tipc_bcast_unlock(struct net *net)
+{
+ spin_unlock_bh(&tipc_net(net)->bclock);
+}
+
#endif