Changeset db24058 in mainline for uspace/lib/libc/include/bitops.h


Ignore:
Timestamp:
2009-06-30T15:53:15Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d11a7d8
Parents:
6db6fd1
Message:

small fixes and coding style changes related to the new memory allocator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/include/bitops.h

    r6db6fd1 rdb24058  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    4343 * If number is zero, it returns 0
    4444 */
    45 static inline int fnzb32(uint32_t arg)
     45static inline unsigned int fnzb32(uint32_t arg)
    4646{
    47         int n = 0;
    48 
     47        unsigned int n = 0;
     48       
    4949        if (arg >> 16) {
    5050                arg >>= 16;
     
    7575}
    7676
    77 static inline int fnzb64(uint64_t arg)
     77static inline unsigned int fnzb64(uint64_t arg)
    7878{
    79         int n = 0;
    80 
     79        unsigned int n = 0;
     80       
    8181        if (arg >> 32) {
    8282                arg >>= 32;
     
    8484        }
    8585       
    86         return n + fnzb32((uint32_t) arg);
     86        return (n + fnzb32((uint32_t) arg));
    8787}
    8888
    89 #define fnzb(x) fnzb32(x)
     89static inline unsigned int fnzb(size_t arg)
     90{
     91        return fnzb64(arg);
     92}
    9093
    9194#endif
Note: See TracChangeset for help on using the changeset viewer.