________________________________________
From: [email protected] <[email protected]> on 
behalf of Alin Serdean <[email protected]>
Sent: Thursday, July 13, 2017 9:40 PM
To: [email protected]
Subject: [ovs-dev] [PATCH 23/40] datapath-windows: Add annotations for 
OvsReleasePidHashLock

Add function annotations for ` OvsReleasePidHashLock`.
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 <[email protected]>
---
 datapath-windows/ovsext/User.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/datapath-windows/ovsext/User.c b/datapath-windows/ovsext/User.c
index d2ef4aa..3d4bebe 100644
--- a/datapath-windows/ovsext/User.c
+++ b/datapath-windows/ovsext/User.c
@@ -61,6 +61,10 @@ OvsAcquirePidHashLock()
     NdisAcquireSpinLock(&(gOvsSwitchContext->pidHashLock));
 }

+_IRQL_requires_(DISPATCH_LEVEL)
+_IRQL_restores_global_(OldIrql, gOvsSwitchContext->pidHashLock)
+_Requires_lock_held_(gOvsSwitchContext->pidHashLock)
+_Releases_lock_(gOvsSwitchContext->pidHashLock)
 static __inline VOID
 OvsReleasePidHashLock()
 {
--
2.10.2.windows.1
_______________________________________________

Acked-by: Shashank Ram <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to