[ovs-dev] [PATCH] datapath-windows: We don't need wrappers for Interlocked ops

Samuel Ghinet sghinet at cloudbasesolutions.com
Wed Aug 6 13:31:47 UTC 2014


We don't need wrappers for Interlocked ops.

Atomic.h contain simple wrappers for windows kernel API interlocked functions.

There is no reason to use the wrappers instead of the Kernel API functions directly.

Signed-off-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
---
 datapath-windows/ovsext/Core/Atomic.h          | 32 --------------------------
 datapath-windows/ovsext/ovsext.vcxproj         |  1 -
 datapath-windows/ovsext/ovsext.vcxproj.filters |  3 ---
 3 files changed, 36 deletions(-)
 delete mode 100644 datapath-windows/ovsext/Core/Atomic.h

diff --git a/datapath-windows/ovsext/Core/Atomic.h b/datapath-windows/ovsext/Core/Atomic.h
deleted file mode 100644
index a94d1fb..0000000
--- a/datapath-windows/ovsext/Core/Atomic.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2014 VMware, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __OVS_ATOMIC_H_
-#define __OVS_ATOMIC_H_ 1
-
-static __inline UINT64
-atomic_add64(UINT64 *ptr, UINT32 val)
-{
-    return InterlockedAdd64((LONGLONG volatile *) ptr, (LONGLONG) val);
-}
-
-static __inline UINT64
-atomic_inc64(UINT64 *ptr)
-{
-    return InterlockedIncrement64((LONGLONG volatile *) ptr);
-}
-
-#endif /* __OVS_ATOMIC_H_ */
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index 9c11a34..e955a73 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -70,7 +70,6 @@
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <ItemGroup Label="WrappedTaskItems">
-    <ClInclude Include="Core\Atomic.h" />
     <ClInclude Include="Core\Debug.h" />
     <ClInclude Include="Core\IpHelper.h" />
     <ClInclude Include="Core\Jhash.h" />
diff --git a/datapath-windows/ovsext/ovsext.vcxproj.filters b/datapath-windows/ovsext/ovsext.vcxproj.filters
index d2fdf5f..24bcfbe 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj.filters
+++ b/datapath-windows/ovsext/ovsext.vcxproj.filters
@@ -1,9 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <ClInclude Include="Core\Atomic.h">
-      <Filter>Core</Filter>
-    </ClInclude>
     <ClInclude Include="Core\Debug.h">
       <Filter>Core</Filter>
     </ClInclude>
--
1.8.3.msysgit.0




More information about the dev mailing list