X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Ftipc%2Fnode_subscr.c;h=c3c2815ae6309cd9df42fbba783c3c06a9be20c9;hb=c55d267de274d308927b60c3e740c1a826832317;hp=018a55332d9178248671f33dfd4a5577e476cb0d;hpb=008d23e4852d78bb2618f2035f8b2110b6a6b968;p=karo-tx-linux.git diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index 018a55332d91..c3c2815ae630 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c @@ -2,7 +2,7 @@ * net/tipc/node_subscr.c: TIPC "node down" subscription handling * * Copyright (c) 1995-2006, Ericsson AB - * Copyright (c) 2005, Wind River Systems + * Copyright (c) 2005, 2010-2011, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -76,3 +76,22 @@ void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub) list_del_init(&node_sub->nodesub_list); tipc_node_unlock(node_sub->node); } + +/** + * tipc_nodesub_notify - notify subscribers that a node is unreachable + * + * Note: node is locked by caller + */ + +void tipc_nodesub_notify(struct tipc_node *node) +{ + struct tipc_node_subscr *ns; + + list_for_each_entry(ns, &node->nsub, nodesub_list) { + if (ns->handle_node_down) { + tipc_k_signal((Handler)ns->handle_node_down, + (unsigned long)ns->usr_handle); + ns->handle_node_down = NULL; + } + } +}