diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2017-07-14 04:40:56 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-08-02 11:30:44 -0700 |
commit | b27b4e5f05a6f2e27bd5ef9b0078a5ccc6678b7c (patch) | |
tree | 9baae63d6a9404fb357f000dec683d9d46f46f0a /datapath-windows/ovsext/Util.c | |
parent | c5a12e53f86fedfe389c6ba66666026589006594 (diff) | |
download | openvswitch-b27b4e5f05a6f2e27bd5ef9b0078a5ccc6678b7c.tar.gz |
datapath-windows: Use annotations instead for macros
We can safely use function annotations to instead of defining out own macros.
Nuke implementation of `OVS_VERIFY_IRQL_LE` and OVS_VERIFY_IRQL (unused).
Add function annotations to the functions which were using OVS_VERIFY_IRQL_LE`.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Shashank Ram <rams@vmware.com>
Diffstat (limited to 'datapath-windows/ovsext/Util.c')
-rw-r--r-- | datapath-windows/ovsext/Util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/datapath-windows/ovsext/Util.c b/datapath-windows/ovsext/Util.c index 3c9b05281..abd38c2fe 100644 --- a/datapath-windows/ovsext/Util.c +++ b/datapath-windows/ovsext/Util.c @@ -25,10 +25,10 @@ extern NDIS_HANDLE gOvsExtDriverHandle; +_Use_decl_annotations_ VOID* OvsAllocateMemoryWithTag(size_t size, ULONG tag) { - OVS_VERIFY_IRQL_LE(DISPATCH_LEVEL); return NdisAllocateMemoryWithTagPriority(gOvsExtDriverHandle, (UINT32)size, tag, NormalPoolPriority); } @@ -40,19 +40,18 @@ OvsFreeMemoryWithTag(VOID *ptr, ULONG tag) NdisFreeMemoryWithTagPriority(gOvsExtDriverHandle, ptr, tag); } +_Use_decl_annotations_ VOID * OvsAllocateMemory(size_t size) { - OVS_VERIFY_IRQL_LE(DISPATCH_LEVEL); return NdisAllocateMemoryWithTagPriority(gOvsExtDriverHandle, (UINT32)size, OVS_MEMORY_TAG, NormalPoolPriority); } +_Use_decl_annotations_ VOID * OvsAllocateAlignedMemory(size_t size, UINT16 align) { - OVS_VERIFY_IRQL_LE(DISPATCH_LEVEL); - ASSERT((align == 8) || (align == 16)); if ((align == 8) || (align == 16)) { |