Add in OFFSET_OF macro as defined in MDE Library spec

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2523 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2007-04-02 08:40:56 +00:00
parent eb9603a0b7
commit 9471ecb798

View File

@ -195,6 +195,11 @@ typedef CHAR8 *VA_LIST;
#endif
//
// Macro that returns the byte offset of a field in a data structure.
//
#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
///
/// CONTAINING_RECORD - returns a pointer to the structure
/// from one of it's elements.