From fa1324c92810c6b1e33b7e87caaaf2e6c4041040 Mon Sep 17 00:00:00 2001 From: Samuel Ghinet Date: Fri, 29 Aug 2014 04:06:48 +0000 Subject: datapath-windows: Rename files. This patch includes the file renaming and accommodations needed for the file renaming to build the forwarding extension for Hyper-V. This patch is also a follow-up for the thread: http://openvswitch.org/pipermail/dev/2014-August/044005.html Signed-off-by: Samuel Ghinet Co-authored-by: Alin Gabriel Serdean Signed-off-by: Ben Pfaff --- datapath-windows/ovsext/Atomic.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 datapath-windows/ovsext/Atomic.h (limited to 'datapath-windows/ovsext/Atomic.h') diff --git a/datapath-windows/ovsext/Atomic.h b/datapath-windows/ovsext/Atomic.h new file mode 100644 index 000000000..1e45d9f89 --- /dev/null +++ b/datapath-windows/ovsext/Atomic.h @@ -0,0 +1,32 @@ +/* + * 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 __ATOMIC_H_ +#define __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 /* __ATOMIC_H_ */ -- cgit v1.2.1