Changeset 5b382774 in mainline for kernel/generic/include/macros.h


Ignore:
Timestamp:
2012-07-24T14:19:58Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4a6da62
Parents:
2696a76
Message:

Added member_to_inst() to macros.h in uspace and kernel.

File:
1 edited

Legend:

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

    r2696a76 r5b382774  
    131131        })
    132132
     133
     134#ifndef member_to_inst
     135#define member_to_inst(ptr_member, type, member_identif) \
     136        ((type*) (((void*)(ptr_member)) - ((void*)&(((type*)0)->member_identif))))
     137#endif
     138
     139
    133140#endif
    134141
Note: See TracChangeset for help on using the changeset viewer.