diff options
| author | 2020-02-05 15:48:20 -0400 | |
|---|---|---|
| committer | 2020-06-18 16:29:15 -0400 | |
| commit | be320a9e10fda32a984b12cdfe3aaf09cc67b39a (patch) | |
| tree | f2bb28be6adc2a416b59393bb8f438636e9c79c1 /src/common/spin_lock.h | |
| parent | Tests: Add tests for fibers and refactor/fix Fiber class (diff) | |
| download | yuzu-be320a9e10fda32a984b12cdfe3aaf09cc67b39a.tar.gz yuzu-be320a9e10fda32a984b12cdfe3aaf09cc67b39a.tar.xz yuzu-be320a9e10fda32a984b12cdfe3aaf09cc67b39a.zip | |
Common: Polish Fiber class, add comments, asserts and more tests.
Diffstat (limited to 'src/common/spin_lock.h')
| -rw-r--r-- | src/common/spin_lock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/spin_lock.h b/src/common/spin_lock.h index cbc67b6c8..70282a961 100644 --- a/src/common/spin_lock.h +++ b/src/common/spin_lock.h | |||
| @@ -12,6 +12,7 @@ class SpinLock { | |||
| 12 | public: | 12 | public: |
| 13 | void lock(); | 13 | void lock(); |
| 14 | void unlock(); | 14 | void unlock(); |
| 15 | bool try_lock(); | ||
| 15 | 16 | ||
| 16 | private: | 17 | private: |
| 17 | std::atomic_flag lck = ATOMIC_FLAG_INIT; | 18 | std::atomic_flag lck = ATOMIC_FLAG_INIT; |