aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkSharedMutex.cpp
Commit message (Collapse)AuthorAge
* SkSharedMutex::acquire to check thread state.Gravatar Ben Wagner2018-05-15
| | | | | | | | | | This makes SkSharedMutex::acquire() assert if a thread has already acquired a shared lock. Change-Id: I35a186a137b9efcad1132093e1bb18c8822e1538 Reviewed-on: https://skia-review.googlesource.com/128160 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Teach TSAN directly about semaphore_t.Gravatar Mike Klein2017-09-21
| | | | | | | | | | | | | | | Instead of teaching TSAN than SkMutex is a lock to get around it not understanding Mach semaphore_t routines, teach it that there is a happens-before relationship between semaphore_signal() and semaphore_wait(). This reverts commit e395bf2d189e22822ddf2b46541c510d6d8fbcc0. New changes are entirely restricted to SkSemaphore.cpp. Change-Id: I27f647b93c48e81e8327db849881d669c4cd3d04 Reviewed-on: https://skia-review.googlesource.com/49180 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Mac TSAN support: annotate Sk[Base]Mutex as a mutex.Gravatar Mike Klein2017-09-19
| | | | | | | | | | | | TSAN does not intercept Mach semaphore_t calls used to implement SkBaseMutex's fSemaphore (its OSSemaphore field). We can teach it that Sk[Base]Mutex is a mutex anyway with the same annotations we use for SkSharedMutex. Change-Id: Ib91928bb9fcfa94f5cea985b46dea31ff2b56963 Reviewed-on: https://skia-review.googlesource.com/48580 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Detect TSAN instead of relying on #ifdef THREAD_SANITIZER.Gravatar mtklein2016-08-30
| | | | | | | | | | | And reindent. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2293063002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot Review-Url: https://codereview.chromium.org/2293063002
* Unify ThreadID.Gravatar herb2015-09-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1371303003
* Have /src files use header directly.Gravatar herb2015-09-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1373253003
* Move SkAtomics.h to private.Gravatar herb2015-09-28
| | | | | | | | | | There are no API changes. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1369333004
* Make mutex semaphore based.Gravatar herb2015-09-24
| | | | | | | | | | | | This implementation improves performance of SkMutex acquire / release pair from 42ns -> 13 ns. SkSharedMutex and SkSpinlock have the same performance. It also removes specialized windows and linux/mac code. BUG=skia: Review URL: https://codereview.chromium.org/1359733002
* Add debug mode to shared mutex.Gravatar herb2015-09-18
| | | | Review URL: https://codereview.chromium.org/1307863009
* Use atomic subtract in shared mutex.Gravatar herb2015-09-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1348173003
* Add asserts for shared mutex.Gravatar herb2015-08-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1285973003
* Fix undefined behavior.Gravatar herb2015-07-15
| | | | | | BUG=skia:4050 Review URL: https://codereview.chromium.org/1232003008
* Add annotations to SkSharedMutex.Gravatar herb2015-06-30
| | | | | | BUG=skia:3997 Review URL: https://codereview.chromium.org/1213663004
* Implement shared locks in the style of pthread's rwlock.Gravatar herb2015-06-29
BUG=skia: Review URL: https://codereview.chromium.org/1215503005