Changeset 03362fbd in mainline for uspace/lib/c/include/macros.h


Ignore:
Timestamp:
2013-02-09T23:14:45Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
22dfd38
Parents:
b5d2e57 (diff), 005b765 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Conflict resulting from bool.h → stdbool.h move and ddf structs turning opaque.
Fails to boot to shell console.

File:
1 edited

Legend:

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

    rb5d2e57 r03362fbd  
    3838#define min(a, b)  ((a) < (b) ? (a) : (b))
    3939#define max(a, b)  ((a) > (b) ? (a) : (b))
     40#define abs(a)     ((a) >= 0 ? (a) : (-a))
     41
    4042
    4143#define KiB2SIZE(kb)  ((kb) << 10)
     
    5254            | ((((uint64_t) (up)) & 0xffffffff) << 32))
    5355
     56#ifndef member_to_inst
     57#define member_to_inst(ptr_member, type, member_identif) \
     58        ((type*) (((void*)(ptr_member)) - ((void*)&(((type*)0)->member_identif))))
    5459#endif
     60
     61
     62#endif
     63
     64#define _paddname(line) PADD_ ## line ## __
     65#define _padd(width, line) uint ## width ## _t _paddname(line)
     66#define PADD32 _padd(32, __LINE__)
     67#define PADD16 _padd(16, __LINE__)
     68#define PADD8 _padd(8, __LINE__)
    5569
    5670/** @}
Note: See TracChangeset for help on using the changeset viewer.