patch-2.1.34 linux/net/ipv6/route.c
Next file: linux/net/ipv6/sysctl_net_ipv6.c
Previous file: linux/net/ipv6/raw.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Mon Apr 14 09:31:10 1997
- Orig file:
v2.1.33/linux/net/ipv6/route.c
- Orig date:
Thu Mar 27 14:40:17 1997
diff -u --recursive --new-file v2.1.33/linux/net/ipv6/route.c linux/net/ipv6/route.c
@@ -5,7 +5,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
- * $Id: route.c,v 1.9 1997/03/19 14:56:25 davem Exp $
+ * $Id: route.c,v 1.10 1997/04/12 04:32:57 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -62,7 +62,7 @@
};
struct rt6_info ip6_null_entry = {
- {{NULL, 0, 0, NULL,
+ {{NULL, ATOMIC_INIT, ATOMIC_INIT, NULL,
0, 0, 0, 0, 0, 0, 0, 0, -ENETUNREACH, NULL, NULL,
ip6_pkt_discard, ip6_pkt_discard, &ip6_dst_ops}},
NULL, {{{0}}}, 256, RTF_REJECT|RTF_NONEXTHOP, ~0UL,
@@ -93,7 +93,7 @@
#define ip6_rt_policy (0)
#endif
-static atomic_t rt6_tbl_lock = 0;
+static atomic_t rt6_tbl_lock = ATOMIC_INIT;
static int rt6_bh_mask = 0;
#define RT_BH_REQUEST 1
@@ -514,7 +514,7 @@
void rt6_ins(struct rt6_info *rt)
{
start_bh_atomic();
- if (rt6_tbl_lock == 1)
+ if (atomic_read(&rt6_tbl_lock) == 1)
fib6_add(&ip6_routing_table, rt);
else
rtreq_add(rt, RT_OPER_ADD);
@@ -721,7 +721,7 @@
rt6_dflt_pointer = NULL;
- if (rt6_tbl_lock == 1)
+ if (atomic_read(&rt6_tbl_lock) == 1)
fib6_del(rt);
else
rtreq_add(rt, RT_OPER_DEL);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov