[ovs-dev] [PATCH 22/40] datapath-windows: Add annotations for OvsReleaseEventQueueLock

Shashank Ram rams at vmware.com
Fri Jul 14 17:06:53 UTC 2017





________________________________________
From: ovs-dev-bounces at openvswitch.org <ovs-dev-bounces at openvswitch.org> on behalf of Alin Serdean <aserdean at cloudbasesolutions.com>
Sent: Thursday, July 13, 2017 9:40 PM
To: dev at openvswitch.org
Subject: [ovs-dev] [PATCH 22/40] datapath-windows: Add annotations for OvsReleaseEventQueueLock

Add function annotations for ` OvsReleaseEventQueueLock`.
We make it aware that it requires a certain dispatch level, that it
restores the dispatch level, that it requires a lock held and releases
a lock.

Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
---
 datapath-windows/ovsext/Event.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/datapath-windows/ovsext/Event.c b/datapath-windows/ovsext/Event.c
index 71fcd4b..348f032 100644
--- a/datapath-windows/ovsext/Event.c
+++ b/datapath-windows/ovsext/Event.c
@@ -60,6 +60,10 @@ OvsAcquireEventQueueLock(int eventId)
     NdisAcquireSpinLock(&eventQueueLockArr[eventId]);
 }

+_IRQL_requires_(DISPATCH_LEVEL)
+_IRQL_restores_global_(OldIrql, eventQueueLockArr[eventId])
+_Requires_lock_held_(eventQueueLockArr[eventId])
+_Releases_lock_(eventQueueLockArr[eventId])
 static __inline VOID
 OvsReleaseEventQueueLock(int eventId)
 {
--
2.10.2.windows.1
_______________________________________________

Acked-by: Shashank Ram <rams at vmware.com>


More information about the dev mailing list