Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit bd8ba38

Browse files
committed
Merge pull request #1082 from Adlai-Holler/feature/RemoveSpinLock
Remove SpinLock to ensure it doesn't get used in new code.
2 parents 46bcc90 + e972059 commit bd8ba38

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

AsyncDisplayKit/Details/ASThread.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -195,39 +195,6 @@ namespace ASDN {
195195
typedef Locker<StaticMutex> StaticMutexLocker;
196196
typedef Unlocker<StaticMutex> StaticMutexUnlocker;
197197

198-
struct SpinLock
199-
{
200-
SpinLock &operator= (bool value) {
201-
_l = value ? ~0 : 0; return *this;
202-
}
203-
204-
SpinLock() { _l = OS_SPINLOCK_INIT; }
205-
SpinLock(const SpinLock&) = delete;
206-
SpinLock &operator=(const SpinLock&) = delete;
207-
208-
bool try_lock () {
209-
return OSSpinLockTry (&_l);
210-
}
211-
212-
void lock () {
213-
OSSpinLockLock(&_l);
214-
}
215-
216-
void unlock () {
217-
OSSpinLockUnlock(&_l);
218-
}
219-
220-
OSSpinLock *spinlock () {
221-
return &_l;
222-
}
223-
224-
private:
225-
OSSpinLock _l;
226-
};
227-
228-
typedef Locker<SpinLock> SpinLocker;
229-
typedef Unlocker<SpinLock> SpinUnlocker;
230-
231198
struct Condition
232199
{
233200
Condition () {

0 commit comments

Comments
 (0)