1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core: instead of cpp-style, use C-style comments

This commit is contained in:
Alexandre Abadie 2018-02-05 11:39:34 +01:00
parent 3d4d9c7902
commit aa57ea5b74

View File

@ -25,7 +25,7 @@
unsigned bitarithm_msb(unsigned v)
{
register unsigned r; // result of log2(v) will go here
register unsigned r; /* result of log2(v) will go here */
#if ARCH_32_BIT
register unsigned shift;
@ -37,7 +37,7 @@ unsigned bitarithm_msb(unsigned v)
r |= (v >> 1);
#else
r = 0;
while (v >>= 1) { // unroll for more speed...
while (v >>= 1) { /* unroll for more speed... */
r++;
}
@ -48,10 +48,10 @@ unsigned bitarithm_msb(unsigned v)
unsigned bitarithm_bits_set(unsigned v)
{
unsigned c; // c accumulates the total bits set in v
unsigned c; /* c accumulates the total bits set in v */
for (c = 0; v; c++) {
v &= v - 1; // clear the least significant bit set
v &= v - 1; /* clear the least significant bit set */
}
return c;