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

> Ffs is a bit-scanning routine present on most (all?) unix systems. On mos=
t processors, there is an instruction to do this, making this operation nic=
e and fast. Windows does not have ffs, so I wrote a (rather slower) version=
 of it in c as a backup. (The x86 does have this instruction (it's called B=
SF, 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 a=
n 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=
=3D
issue.
--=20
Tanaka Akira