blob: 8341d0bfe5acf86db15b2f0d0ee5b207b6cf9bed [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2006 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
reed@android.com8a1c16f2008-12-17 15:59:43 +00009
10#include "SkThread.h"
11
reed@google.comdcbd6e32012-01-12 15:21:16 +000012int32_t sk_atomic_inc(int32_t* addr) {
reed@android.com8a1c16f2008-12-17 15:59:43 +000013 int32_t value = *addr;
14 *addr = value + 1;
15 return value;
16}
17
reed@google.comdcbd6e32012-01-12 15:21:16 +000018int32_t sk_atomic_dec(int32_t* addr) {
reed@android.com8a1c16f2008-12-17 15:59:43 +000019 int32_t value = *addr;
20 *addr = value - 1;
21 return value;
22}
23
reed@google.comdcbd6e32012-01-12 15:21:16 +000024SkMutex::SkMutex() {}
reed@android.com8a1c16f2008-12-17 15:59:43 +000025
reed@google.comdcbd6e32012-01-12 15:21:16 +000026SkMutex::~SkMutex() {}
reed@android.com8a1c16f2008-12-17 15:59:43 +000027
reed@google.comdcbd6e32012-01-12 15:21:16 +000028void SkMutex::acquire() {}
reed@android.com8a1c16f2008-12-17 15:59:43 +000029
reed@google.comdcbd6e32012-01-12 15:21:16 +000030void SkMutex::release() {}
reed@android.com8a1c16f2008-12-17 15:59:43 +000031
reed@google.com48ca7e32012-05-07 20:23:27 +000032//////////////////////////////////////////////////////////////////////////
33
34static void* gSpecific;
35
36void* SkTLS::PlatformGetSpecific() {
37 return gSpecific;
38}
39
40void SkTLS::PlatformSetSpecific(void* ptr) {
41 gSpecific = ptr;
42}