2017-11-28 05:30:10 +08:00
|
|
|
.. title:: clang-tidy - objc-avoid-spinlock
|
|
|
|
|
|
|
|
objc-avoid-spinlock
|
|
|
|
===================
|
|
|
|
|
2017-11-30 06:17:39 +08:00
|
|
|
Finds usages of ``OSSpinlock``, which is deprecated due to potential livelock
|
|
|
|
problems.
|
2017-11-28 05:30:10 +08:00
|
|
|
|
|
|
|
This check will detect following function invocations:
|
|
|
|
|
2017-11-30 06:17:39 +08:00
|
|
|
- ``OSSpinlockLock``
|
|
|
|
- ``OSSpinlockTry``
|
|
|
|
- ``OSSpinlockUnlock``
|
2017-11-28 05:30:10 +08:00
|
|
|
|
2017-11-30 06:17:39 +08:00
|
|
|
The corresponding information about the problem of ``OSSpinlock``: https://blog.postmates.com/why-spinlocks-are-bad-on-ios-b69fc5221058
|