Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 831667a9 in mainline


Ignore:
Timestamp:
2009-06-03T18:33:55Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial
Children:
815bf9a5
Parents:
8658f89
Message:

port macros from kernel

File:
1 edited

Legend:

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

    r8658f89 r831667a9  
    3636#define LIBC_MACROS_H_
    3737
    38 #define SIZE2KB(size) ((size) >> 10)
    39 #define SIZE2MB(size) ((size) >> 20)
     38#define SIZE2KB(size)  ((size) >> 10)
     39#define SIZE2MB(size)  ((size) >> 20)
    4040
    41 #define KB2SIZE(kb) ((kb) << 10)
    42 #define MB2SIZE(mb) ((mb) << 20)
     41#define KB2SIZE(kb)  ((kb) << 10)
     42#define MB2SIZE(mb)  ((mb) << 20)
    4343
    44 #define STRING(arg) STRING_ARG(arg)
    45 #define STRING_ARG(arg) #arg
     44#define STRING(arg)      STRING_ARG(arg)
     45#define STRING_ARG(arg)  #arg
     46
     47#define LOWER32(arg)  ((arg) & 0xffffffff)
     48#define UPPER32(arg)  (((arg) >> 32) & 0xffffffff)
     49
     50#define MERGE_LOUP32(lo, up) \
     51        ((((uint64_t) (lo)) & 0xffffffff) \
     52            | ((((uint64_t) (up)) & 0xffffffff) << 32))
    4653
    4754#endif
Note: See TracChangeset for help on using the changeset viewer.