[sheepdog] [PATCH] add macro to check bitops.h if included already
Liu Yuan
namei.unix at gmail.com
Wed May 16 10:08:25 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
include/bitops.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/bitops.h b/include/bitops.h
index 3876cbd..77d5a97 100644
--- a/include/bitops.h
+++ b/include/bitops.h
@@ -1,3 +1,6 @@
+#ifndef __BITOPS_H__
+#define __BITOPS_H__
+
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define BITS_PER_BYTE 8
#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
@@ -479,3 +482,5 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
return oldbit;
}
+
+#endif /* __BITOPS_H__ */
--
1.7.8.2
More information about the sheepdog
mailing list