From patchwork Fri Jul 14 04:40:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin Serdean X-Patchwork-Id: 788093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x80j86Kbvz9s7m for ; Fri, 14 Jul 2017 14:54:36 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 114B2CC9; Fri, 14 Jul 2017 04:41:24 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp2.linuxfoundation.org (smtp2.linux-foundation.org [172.17.192.36]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C5D64BD9 for ; Fri, 14 Jul 2017 04:40:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cloudbasesolutions.com (mail.cloudbasesolutions.com [91.232.152.5]) by smtp2.linuxfoundation.org (Postfix) with ESMTP id 17BDE1DBFA for ; Fri, 14 Jul 2017 04:40:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id D4A5F40865 for ; Fri, 14 Jul 2017 07:40:56 +0300 (EEST) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from mail.cloudbasesolutions.com ([127.0.0.1]) by localhost (mail.cloudbasesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UaY6eHFEEyS5 for ; Fri, 14 Jul 2017 07:40:56 +0300 (EEST) Received: from mail.cloudbasesolutions.com (unknown [10.77.78.3]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id 196C040B19 for ; Fri, 14 Jul 2017 07:40:56 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0361.001; Fri, 14 Jul 2017 06:40:55 +0200 From: Alin Serdean To: "dev@openvswitch.org" Thread-Topic: [PATCH 21/40] datapath-windows: Add function annotations for OvsAcquireEventQueueLock Thread-Index: AQHS/FthEufZsOseukCTkikGeR2AZg== Date: Fri, 14 Jul 2017 04:40:55 +0000 Message-ID: <20170714044033.15196-22-aserdean@cloudbasesolutions.com> References: <20170714044033.15196-1-aserdean@cloudbasesolutions.com> In-Reply-To: <20170714044033.15196-1-aserdean@cloudbasesolutions.com> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp2.linux-foundation.org Subject: [ovs-dev] [PATCH 21/40] datapath-windows: Add function annotations for OvsAcquireEventQueueLock X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The function should be aware that it raises the dispatch level, saves the dispatch level and acquires a lock. This patch adds annotation for that. Signed-off-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Event.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath-windows/ovsext/Event.c b/datapath-windows/ovsext/Event.c index cabfebf..71fcd4b 100644 --- a/datapath-windows/ovsext/Event.c +++ b/datapath-windows/ovsext/Event.c @@ -51,6 +51,9 @@ OvsCleanupEventQueue() } } +_IRQL_raises_(DISPATCH_LEVEL) +_IRQL_saves_global_(OldIrql, eventQueueLockArr[eventId]) +_Acquires_lock_(eventQueueLockArr[eventId]) static __inline VOID OvsAcquireEventQueueLock(int eventId) {