Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1155)

Unified Diff: src/ports/SkThread_none.cpp

Issue 19808007: Split atomic and mutex implementations and make inlinable. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Include all the files. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ports/SkThread_none.cpp
===================================================================
--- src/ports/SkThread_none.cpp (revision 10251)
+++ src/ports/SkThread_none.cpp (working copy)
@@ -1,43 +0,0 @@
-/*
- * Copyright 2006 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkThread.h"
-
-int32_t sk_atomic_inc(int32_t* addr) {
- int32_t value = *addr;
- *addr = value + 1;
- return value;
-}
-
-int32_t sk_atomic_add(int32_t* addr, int32_t inc) {
- int32_t value = *addr;
- *addr = value + inc;
- return value;
-}
-
-int32_t sk_atomic_dec(int32_t* addr) {
- int32_t value = *addr;
- *addr = value - 1;
- return value;
-}
-void sk_membar_aquire__after_atomic_dec() { }
-
-int32_t sk_atomic_conditional_inc(int32_t* addr) {
- int32_t value = *addr;
- if (value != 0) ++*addr;
- return value;
-}
-void sk_membar_aquire__after_atomic_conditional_inc() { }
-
-SkMutex::SkMutex() {}
-
-SkMutex::~SkMutex() {}
-
-#ifndef SK_USE_POSIX_THREADS
-void SkMutex::acquire() {}
-void SkMutex::release() {}
-#endif

Powered by Google App Engine
This is Rietveld 408576698