aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkAtomics_none.h
Commit message (Collapse)AuthorAge
* Drop support for non-atomic non-mutex platforms.Gravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | | | (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
* Implement sk_atomic_conditional_inc with sk_atomic_cas.Gravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | | | Now that we have sk_atomic_cas, we can replace all the platform-specific CAS loops with one. BUG=skia: R=bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/300553003 git-svn-id: http://skia.googlecode.com/svn/trunk@14892 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use a spinlock in SkOnce.Gravatar commit-bot@chromium.org2014-01-08
| | | | | | | | | | | | | | | | | SkOnceFlag is now statically initializable on all platforms. Also adds sk_atomic_cas, used to implement new SkSpinlock. Going to punt on making SkOnceFlag any smaller (for now, it's 8 bytes). We could conceivably get it down to two bits, one for done and one for a one-bit spinlock (we'd need atomic-& and atomic-| to make that work, but they appear to be available everywhere). BUG=skia:1929 R=bungeman@google.com, reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/123093002 git-svn-id: http://skia.googlecode.com/svn/trunk@12968 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split atomic and mutex implementations and make inlinable.Gravatar bungeman@google.com2013-12-18
Skia cannot use Chromium's implementation of mutex (Lock) due to static initializers. However, we would like to be able to use Chromium's implementation of atomics. This motivates the split of implementation. Skia's atomic and mutex calls should be inlinable, especially the atomics. These calls often compile down to very few instructions, and we currently have the overhead of a function call. This motivates the header implementation. There is still a desire for the build system to select the implementation, so the SK_XXX_PLATFORM_H pattern for header files is introduced. This allows the build system to control which platform specific header files are chosen. The Chromium side changes (most of which will need to go in before this change can be found at https://codereview.chromium.org/19477005/ . The Chromium side changes after this lands can be seen at https://codereview.chromium.org/98073013 . Review URL: https://codereview.chromium.org/19808007 git-svn-id: http://skia.googlecode.com/svn/trunk@12738 2bbb7eff-a529-9590-31e7-b0007b416f81