Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
#include <limits.h>
#include "mutex.h"
#include <limits.h>
#include "mutex.h"
#define MP_SAFE /* define to make thread safe */
#define SMALLOC_REDZONE /* define to detect memory corruption */
#define MP_SAFE /* define to make thread safe */
#define SMALLOC_REDZONE /* define to detect memory corruption */
{
assert(word != -1U);
word >>= (start + 1);
{
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)
}
static int add_pool(struct pool *pool, unsigned int alloc_size)