2010/5/12 caleb clausen <redmine / ruby-lang.org>:

> Ffs is a bit-scanning routine present on most (all?) unix systems. On most processors, there is an instruction to do this, making this operation nice and fast. Windows does not have ffs, so I wrote a (rather slower) versionf it in c as a backup. (The x86 does have this instruction (it's called BSF, I think), but windows just doesn't make a nice programmer interface to it like unix does. If anyone wants to help me write the appropriate inline assembler to make this fast on windows too, I'd appreciate it.) I've made an ffs method available on Fixnum and Bignum at the ruby level as well.
> See http://linux.die.net/man/3/ffs

I added ffs() function for Ruby internal.
(I used it in time.c)

So you don't need to provide ffs() in C level.

I think Fixnum#ffs and Bignum#ffs should be separated from Thread#priority=
issue.
-- 
Tanaka Akira