From b3268b928ec7596a1d294a46a2771c3da789e7d3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 2 Jun 2008 09:59:32 +0200 Subject: [PATCH] smalloc: use optimized ffz() Signed-off-by: Jens Axboe --- smalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smalloc.c b/smalloc.c index 6cbf59cf..0a86c43b 100644 --- a/smalloc.c +++ b/smalloc.c @@ -12,7 +12,7 @@ #include #include "mutex.h" -#include "lib/ffz.h" +#include "arch/arch.h" #define MP_SAFE /* define to make thread safe */ #define SMALLOC_REDZONE /* define to detect memory corruption */ @@ -178,7 +178,7 @@ static int find_next_zero(int word, int start) { assert(word != -1U); word >>= (start + 1); - return __ffs(~word) + start + 1; + return ffz(word) + start + 1; } static int add_pool(struct pool *pool, unsigned int alloc_size) -- 2.25.1