aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkAtomics_none.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-27 15:16:37 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-27 15:16:37 +0000
commitabf4189f340dc0b714b945a8954d955c570880bf (patch)
tree71311c09e2029075ef6013e6901dbf6d9691f684 /src/ports/SkAtomics_none.h
parent212b211ce8e0fa0ef59ca2d1f4e91590fa5f91bf (diff)
Drop support for non-atomic non-mutex platforms.
(Clients can still provide these themselves if they really want.) BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/295373005 git-svn-id: http://skia.googlecode.com/svn/trunk@14894 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports/SkAtomics_none.h')
-rw-r--r--src/ports/SkAtomics_none.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/ports/SkAtomics_none.h b/src/ports/SkAtomics_none.h
deleted file mode 100644
index 73cbf0af22..0000000000
--- a/src/ports/SkAtomics_none.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkAtomics_none_DEFINED
-#define SkAtomics_none_DEFINED
-
-/** Non-atomic atomics for uniprocessor systems. */
-
-#include <stdint.h>
-
-static inline int32_t sk_atomic_inc(int32_t* addr) {
- int32_t value = *addr;
- *addr = value + 1;
- return value;
-}
-
-static inline int32_t sk_atomic_add(int32_t* addr, int32_t inc) {
- int32_t value = *addr;
- *addr = value + inc;
- return value;
-}
-
-static inline int32_t sk_atomic_dec(int32_t* addr) {
- int32_t value = *addr;
- *addr = value - 1;
- return value;
-}
-
-static inline void sk_membar_acquire__after_atomic_dec() { }
-
-static inline bool sk_atomic_cas(int32_t* addr, int32_t before, int32_t after) {
- if (*addr != before) return false;
- *addr = after;
- return true;
-}
-
-static inline void sk_membar_acquire__after_atomic_conditional_inc() { }
-
-#endif