summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-05-16 09:47:11 -0300
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-05-16 09:47:11 -0300
commitc4890c9b282c91e612f5ebf0bc1c20b586c452b4 (patch)
tree6208d9afa938725364a7ce22f0f4af2cd932878f /include
parent910d5f2d220ebb93b086877658aff6c31fd65715 (diff)
o ipx: move route functions to net/ipx/ipx_route.c
Diffstat (limited to 'include')
-rw-r--r--include/net/ipx.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/net/ipx.h b/include/net/ipx.h
index 864359402b31..dd20531f04dd 100644
--- a/include/net/ipx.h
+++ b/include/net/ipx.h
@@ -125,4 +125,36 @@ extern void ipx_proc_exit(void);
extern const char *ipx_frame_name(unsigned short);
extern const char *ipx_device_name(struct ipx_interface *intrfc);
+
+static __inline__ void ipxitf_hold(struct ipx_interface *intrfc)
+{
+ atomic_inc(&intrfc->refcnt);
+}
+
+extern void ipxitf_down(struct ipx_interface *intrfc);
+
+static __inline__ void ipxitf_put(struct ipx_interface *intrfc)
+{
+ if (atomic_dec_and_test(&intrfc->refcnt))
+ ipxitf_down(intrfc);
+}
+
+extern void __ipxitf_down(struct ipx_interface *intrfc);
+
+static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
+{
+ if (atomic_dec_and_test(&intrfc->refcnt))
+ __ipxitf_down(intrfc);
+}
+
+static __inline__ void ipxrtr_hold(struct ipx_route *rt)
+{
+ atomic_inc(&rt->refcnt);
+}
+
+static __inline__ void ipxrtr_put(struct ipx_route *rt)
+{
+ if (atomic_dec_and_test(&rt->refcnt))
+ kfree(rt);
+}
#endif /* _NET_INET_IPX_H_ */