Rename ffz() function to fio_ffz() to avoid conflicts
authorJens Axboe <jens.axboe@oracle.com>
Mon, 21 May 2007 09:42:33 +0000 (11:42 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 21 May 2007 09:42:33 +0000 (11:42 +0200)
Newer gcc/glibc include an ffz function. Lets just do the easy
thing and rename ours to fio_ffz(), then we can look into reusing
a provided one later if necessary.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
arch/arch-alpha.h
arch/arch-ia64.h
arch/arch-ppc.h
arch/arch-s390.h
arch/arch-x86.h
arch/arch-x86_64.h
io_u.c

index 09293bd30fc52e5ac4488e7893594cc753ce6179..b899494fec7b41b359b75a2a66a39567cafb8578 100644 (file)
@@ -12,7 +12,7 @@
 #define __NR_fadvise64         413
 #endif
 
-#define nop    do { } while (0)
-#define ffz(v) generic_ffz((v))
+#define nop            do { } while (0)
+#define fio_ffz(v)     generic_ffz((v))
 
 #endif
index b3ee0c38bc13c442d2166eeabcb0a2c745c763e6..7baccca509feaf0ba168cea082275117151a10d4 100644 (file)
@@ -27,7 +27,7 @@
        ia64_intri_res;                                                 \
 })
 
-static inline unsigned long ffz(unsigned long bitmask)
+static inline unsigned long fio_ffz(unsigned long bitmask)
 {
        return ia64_popcnt(bitmask & (~bitmask - 1));
 }
index 8bfed5979bf2f77ad7f7806e3464a486eeec05a3..0a23c01a56d2c07325930c433e50c6dded20d949 100644 (file)
@@ -28,7 +28,7 @@ static inline int __ilog2(unsigned long bitmask)
        return 31 - lz;
 }
 
-static inline int ffz(unsigned long bitmask)
+static inline int fio_ffz(unsigned long bitmask)
 {
        if ((bitmask = ~bitmask) == 0)
                return 32;
index b7048ad6a11b37a475271f44f9f5483bc5d3a80b..ed5d462d1d969b7e2db4cb994a88115813b24b44 100644 (file)
@@ -12,7 +12,7 @@
 #define __NR_fadvise64         253
 #endif
 
-#define nop    asm volatile ("diag 0,0,68" : : : "memory")
-#define ffz(v) generic_ffz((v))
+#define nop            asm volatile ("diag 0,0,68" : : : "memory")
+#define fio_ffz(v)     generic_ffz((v))
 
 #endif
index aa106920aeaf5cae6a1159d64bb9818196be3be5..574383a65e0c4ca90ea9a2271b51e2390182f10c 100644 (file)
@@ -31,7 +31,7 @@
 
 #define nop    __asm__ __volatile__("rep;nop": : :"memory")
 
-static inline unsigned long ffz(unsigned long bitmask)
+static inline unsigned long fio_ffz(unsigned long bitmask)
 {
        __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask));
        return bitmask;
index 4e0ad5f6e36ab0dcc3e1c37a461a65470a42a3dd..fabdb9ad923db49458417994ef428b1bf3d9499e 100644 (file)
@@ -31,7 +31,7 @@
 
 #define nop    __asm__ __volatile__("rep;nop": : :"memory")
 
-static inline unsigned long ffz(unsigned long bitmask)
+static inline unsigned long fio_ffz(unsigned long bitmask)
 {
        __asm__("bsfq %1,%0" :"=r" (bitmask) :"r" (~bitmask));
        return bitmask;
diff --git a/io_u.c b/io_u.c
index 7fe5242f51287b4bd72102400686eb6f1fcd31f7..e892ec759c761de338f9e5789f74c13a3bbfb45c 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -84,7 +84,7 @@ static int get_next_free_block(struct thread_data *td, struct fio_file *f,
        *b = (i * BLOCKS_PER_MAP);
        while ((*b) * td->o.rw_min_bs < f->real_file_size) {
                if (f->file_map[i] != -1UL) {
-                       *b += ffz(f->file_map[i]);
+                       *b += fio_ffz(f->file_map[i]);
                        f->last_free_lookup = i;
                        return 0;
                }