summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-07 22:55:55 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-07 22:55:55 +0000
commit9bfdfa522da10ebd58168f6c0c5fa37d5fa9fa7f (patch)
tree9c4afef26f5e5b54721565eaedc1d57734e77b11 /MdePkg
parentc0edac24d50893c6e3ea931ee608b4bbcb8ba0b4 (diff)
downloadedk2-9bfdfa522da10ebd58168f6c0c5fa37d5fa9fa7f.zip
edk2-9bfdfa522da10ebd58168f6c0c5fa37d5fa9fa7f.tar.gz
edk2-9bfdfa522da10ebd58168f6c0c5fa37d5fa9fa7f.tar.bz2
Move NEXT_MEMORY_DESCRIPTOR() from UefiSpec.h to UEFI Library
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6902 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Library/UefiLib.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index 0ce4759..1d8a8e1 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -58,7 +58,6 @@ typedef struct {
EFI_LOCK_STATE Lock;
} EFI_LOCK;
-
/**
Macro that returns the number of 100 ns units for a specified number of microseconds.
Useful for managing EFI timer events.
@@ -71,7 +70,6 @@ typedef struct {
**/
#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)
-
/**
Macro that returns the number of 100 ns units for a specified number of milliseoconds.
Useful for managing EFI timer events.
@@ -84,7 +82,6 @@ typedef struct {
**/
#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)
-
/**
Macro that returns the number of 100 ns units for a specified number of seoconds.
Useful for managing EFI timer events.
@@ -97,6 +94,19 @@ typedef struct {
**/
#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000)
+/**
+ Macro that returns the a pointer to the next EFI_MEMORY_DESCRIPTOR in an array
+ returned from GetMemoryMap().
+
+ @param MemoryDescriptor Pointer tot he current EFI_MEMORY_DESCRIPTOR.
+
+ @param Size The size, in bytes, of the current EFI_MEMORY_DESCRIPTOR.
+
+ @return A pointer to the next EFI_MEMORY_DESCRIPTOR.
+
+**/
+#define NEXT_MEMORY_DESCRIPTOR(MemoryDescriptor, Size) \
+ ((EFI_MEMORY_DESCRIPTOR *)((UINT8 *)(MemoryDescriptor) + (Size)))
/**
Retrieves a pointer to the system configuration table from the EFI System Table