This commit adds support for the 2.1 vserver API.
[util-vserver.git] / kernel / cacct_int.h
diff --git a/kernel/cacct_int.h b/kernel/cacct_int.h
new file mode 100644 (file)
index 0000000..045eb50
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _VX_CACCT_INT_H
+#define _VX_CACCT_INT_H
+
+
+#ifdef __KERNEL__
+
+static inline
+unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos)
+{
+       return atomic_read(&cacct->sock[type][pos].count);
+}
+
+
+static inline
+unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos)
+{
+       return atomic_read(&cacct->sock[type][pos].total);
+}
+
+#endif /* __KERNEL__ */
+#endif /* _VX_CACCT_INT_H */