aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bit.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-01 22:38:42 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 22:38:42 -0500
commita844f4510dce23c07f3923cb42138f5fdd745017 (patch)
treeffb37e9e60f02d5e92bd69bb53b568e1c991c17f /fs/xfs/xfs_bit.h
parent61c1e689fbde7cb50a76262bba190715d86beab6 (diff)
[XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot.
SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_bit.h')
-rw-r--r--fs/xfs/xfs_bit.h36
1 files changed, 16 insertions, 20 deletions
diff --git a/fs/xfs/xfs_bit.h b/fs/xfs/xfs_bit.h
index 1e7f57ddf7a8..041e82485064 100644
--- a/fs/xfs/xfs_bit.h
+++ b/fs/xfs/xfs_bit.h
@@ -39,30 +39,26 @@
39/* 39/*
40 * masks with n high/low bits set, 32-bit values & 64-bit values 40 * masks with n high/low bits set, 32-bit values & 64-bit values
41 */ 41 */
42#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK32HI)
43__uint32_t xfs_mask32hi(int n);
44#define XFS_MASK32HI(n) xfs_mask32hi(n) 42#define XFS_MASK32HI(n) xfs_mask32hi(n)
45#else 43static inline __uint32_t xfs_mask32hi(int n)
46#define XFS_MASK32HI(n) ((__uint32_t)-1 << (32 - (n))) 44{
47#endif 45 return (__uint32_t)-1 << (32 - (n));
48#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK64HI) 46}
49__uint64_t xfs_mask64hi(int n);
50#define XFS_MASK64HI(n) xfs_mask64hi(n) 47#define XFS_MASK64HI(n) xfs_mask64hi(n)
51#else 48static inline __uint64_t xfs_mask64hi(int n)
52#define XFS_MASK64HI(n) ((__uint64_t)-1 << (64 - (n))) 49{
53#endif 50 return (__uint64_t)-1 << (64 - (n));
54#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK32LO) 51}
55__uint32_t xfs_mask32lo(int n);
56#define XFS_MASK32LO(n) xfs_mask32lo(n) 52#define XFS_MASK32LO(n) xfs_mask32lo(n)
57#else 53static inline __uint32_t xfs_mask32lo(int n)
58#define XFS_MASK32LO(n) (((__uint32_t)1 << (n)) - 1) 54{
59#endif 55 return ((__uint32_t)1 << (n)) - 1;
60#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK64LO) 56}
61__uint64_t xfs_mask64lo(int n);
62#define XFS_MASK64LO(n) xfs_mask64lo(n) 57#define XFS_MASK64LO(n) xfs_mask64lo(n)
63#else 58static inline __uint64_t xfs_mask64lo(int n)
64#define XFS_MASK64LO(n) (((__uint64_t)1 << (n)) - 1) 59{
65#endif 60 return ((__uint64_t)1 << (n)) - 1;
61}
66 62
67/* Get high bit set out of 32-bit argument, -1 if none set */ 63/* Get high bit set out of 32-bit argument, -1 if none set */
68extern int xfs_highbit32(__uint32_t v); 64extern int xfs_highbit32(__uint32_t v);