2014-05-28 21:43:59 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2014 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SkThreadPriv_DEFINED
|
|
|
|
#define SkThreadPriv_DEFINED
|
|
|
|
|
|
|
|
#include "SkTypes.h"
|
|
|
|
|
2015-01-21 21:13:31 +00:00
|
|
|
// SkAtomics.h must provide inline implementations for the following declarations.
|
2014-05-28 21:43:59 +00:00
|
|
|
|
|
|
|
/** Atomic compare and set, for pointers.
|
|
|
|
* If *addr == before, set *addr to after. Always returns previous value of *addr.
|
2014-05-29 20:13:22 +00:00
|
|
|
* This must issue a release barrier on success, acquire on failure, and always a compiler barrier.
|
2014-05-28 21:43:59 +00:00
|
|
|
*/
|
|
|
|
static void* sk_atomic_cas(void** addr, void* before, void* after);
|
|
|
|
|
2015-01-21 21:13:31 +00:00
|
|
|
#include "SkAtomics.h"
|
2014-05-28 21:43:59 +00:00
|
|
|
|
|
|
|
#endif//SkThreadPriv_DEFINED
|