aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-04-11 09:53:41 -0700
committerGravatar GitHub <noreply@github.com>2017-04-11 09:53:41 -0700
commit6b99d804105e0f979391a95bfd51b1090d656a4e (patch)
tree88dabe98832e69973db1478b3bee7d74e778b303 /include
parent498e2b350aec3d358b3ec505fa800194778cd8e4 (diff)
parent2c3d835d66d5e26aa2695a148cae9c255e8e2a16 (diff)
Merge pull request #10501 from ctiller/epex2
Split event notification out of ev_epoll_linux.c
Diffstat (limited to 'include')
-rw-r--r--include/grpc/impl/codegen/atm_windows.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/grpc/impl/codegen/atm_windows.h b/include/grpc/impl/codegen/atm_windows.h
index b8f63da758..a533651f6f 100644
--- a/include/grpc/impl/codegen/atm_windows.h
+++ b/include/grpc/impl/codegen/atm_windows.h
@@ -95,6 +95,16 @@ static __inline int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n) {
#endif
}
+static __inline int gpr_atm_full_cas(gpr_atm *p, gpr_atm o, gpr_atm n) {
+#ifdef GPR_ARCH_64
+ return o == (gpr_atm)InterlockedCompareExchange64((volatile LONGLONG *)p,
+ (LONGLONG)n, (LONGLONG)o);
+#else
+ return o == (gpr_atm)InterlockedCompareExchange((volatile LONG *)p, (LONG)n,
+ (LONG)o);
+#endif
+}
+
static __inline gpr_atm gpr_atm_no_barrier_fetch_add(gpr_atm *p,
gpr_atm delta) {
/* Use the CAS operation to get pointer-sized fetch and add */