Re: Problem with find_first_bit function and kin

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexander van Heukelum
Date: Sunday, August 17, 2008 - 11:53 pm

On Sun, 17 Aug 2008 19:22:23 -0700 (PDT), "Alex Dubov" <oakad@yahoo.com>
said:

The difference is that __ffs does base-0 indexing on a long type
and ffs does base-1 indexing on a regular int type. Also, __ffs(0)
is undefined, while ffs(0) returns 0. ffs is the odd one out in the
kernel, but its behaviour is set in stone, because gcc may replace
any call to ffs with its own (usually inlined) version, which
behaves as described.

Greetings,
    Alexander
-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - Email service worth paying for. Try it for free

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Problem with find_first_bit function and kin, Alex Dubov, (Sat Aug 16, 12:26 pm)
Re: Problem with find_first_bit function and kin, Alexander van Heukelum, (Sun Aug 17, 4:58 am)
Re: Problem with find_first_bit function and kin, Alex Dubov, (Sun Aug 17, 7:22 pm)
Re: Problem with find_first_bit function and kin, Alexander van Heukelum, (Sun Aug 17, 11:53 pm)