Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/macros.h

    r4738d84 r933cadf  
    9595        overlaps(KA2PA((x)), (szx), KA2PA((y)), (szy))
    9696
    97 #define SIZE2KB(size)  ((size) >> 10)
    98 #define SIZE2MB(size)  ((size) >> 20)
    99 
    100 #define KB2SIZE(kb)  ((kb) << 10)
    101 #define MB2SIZE(mb)  ((mb) << 20)
     97#define KiB2SIZE(kb)  ((kb) << 10)
     98#define MiB2SIZE(mb)  ((mb) << 20)
    10299
    103100#define STRING(arg)      STRING_ARG(arg)
    104101#define STRING_ARG(arg)  #arg
    105102
    106 #define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
    107 #define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
     103#define LOWER32(arg)  (((uint64_t) (arg)) & UINT32_C(0xffffffff))
     104#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & UINT32_C(0xffffffff))
    108105
    109106#define MERGE_LOUP32(lo, up) \
    110         ((((uint64_t) (lo)) & 0xffffffff) \
    111             | ((((uint64_t) (up)) & 0xffffffff) << 32))
     107        ((((uint64_t) (lo)) & UINT32_C(0xffffffff)) \
     108            | ((((uint64_t) (up)) & UINT32_C(0xffffffff)) << 32))
    112109
    113110/** Pseudorandom generator
Note: See TracChangeset for help on using the changeset viewer.