Well why this then? They should be intrinsics...
On 2009-12-07, at 8:43 PM, Timo Kreuzer wrote:
>> +unsigned char BitScanForward(ULONG *
Index, unsigned long Mask)
>> +{
>> + *Index = 0;
>> + while (Mask && ((Mask & 1) == 0))
>> + {
>> + Mask >>= 1;
>> + ++(*Index);
>> + }
>> + return Mask ? 1 : 0;
>> +}
>> +
>> +unsigned char BitScanReverse(ULONG * const Index, unsigned long Mask)
>> +{
>> + *Index = 0;
>> + while (Mask && ((Mask & (1 << 31)) == 0))
>> + {
>> + Mask <<= 1;
>> + ++(*Index);
>> + }
>> + return Mask ? 1 : 0;
>> +}
>>
Best regards,
Alex Ionescu
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org