Ignore:
File:
1 edited

Legend:

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

    r933cadf r4738d84  
    9595        overlaps(KA2PA((x)), (szx), KA2PA((y)), (szy))
    9696
    97 #define KiB2SIZE(kb)  ((kb) << 10)
    98 #define MiB2SIZE(mb)  ((mb) << 20)
     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)
    99102
    100103#define STRING(arg)      STRING_ARG(arg)
    101104#define STRING_ARG(arg)  #arg
    102105
    103 #define LOWER32(arg)  (((uint64_t) (arg)) & UINT32_C(0xffffffff))
    104 #define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & UINT32_C(0xffffffff))
     106#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
     107#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
    105108
    106109#define MERGE_LOUP32(lo, up) \
    107         ((((uint64_t) (lo)) & UINT32_C(0xffffffff)) \
    108             | ((((uint64_t) (up)) & UINT32_C(0xffffffff)) << 32))
     110        ((((uint64_t) (lo)) & 0xffffffff) \
     111            | ((((uint64_t) (up)) & 0xffffffff) << 32))
    109112
    110113/** Pseudorandom generator
Note: See TracChangeset for help on using the changeset viewer.