@@ -83,7 +83,7 @@ class StatusRecordLockRecord :
8383// / Wait for a task's status record lock to be unlocked.
8484// /
8585// / When this function returns, `oldStatus` will have been updated
86- // / to the last value read and `isLocked ()` will be false.
86+ // / to the last value read and `isStatusRecordLocked ()` will be false.
8787// / Of course, another thread may still be concurrently trying
8888// / to acquire the record lock.
8989static void waitForStatusRecordUnlock (AsyncTask *task,
@@ -92,12 +92,12 @@ static void waitForStatusRecordUnlock(AsyncTask *task,
9292 StatusRecordLockRecord::Waiter waiter (StatusRecordLockLock);
9393
9494 while (true ) {
95- assert (oldStatus.isLocked ());
95+ assert (oldStatus.isStatusRecordLocked ());
9696
9797 bool waited = waiter.tryReloadAndWait ([&]() -> StatusRecordLockRecord* {
9898 // Check that oldStatus is still correct.
9999 oldStatus = task->_private ().Status .load (std::memory_order_acquire);
100- if (!oldStatus.isLocked ())
100+ if (!oldStatus.isStatusRecordLocked ())
101101 return nullptr ;
102102
103103 // The innermost entry should be a record lock record; wait
@@ -110,7 +110,7 @@ static void waitForStatusRecordUnlock(AsyncTask *task,
110110
111111 // Reload the status before trying to relock.
112112 oldStatus = task->_private ().Status .load (std::memory_order_acquire);
113- if (!oldStatus.isLocked ())
113+ if (!oldStatus.isStatusRecordLocked ())
114114 return ;
115115 }
116116}
@@ -171,7 +171,7 @@ static bool withStatusRecordLock(AsyncTask *task,
171171 return false ;
172172
173173 // If the old info says we're locked, wait for the lock to clear.
174- if (status.isLocked ()) {
174+ if (status.isStatusRecordLocked ()) {
175175 waitForStatusRecordUnlock (task, status);
176176 continue ;
177177 }
@@ -231,7 +231,7 @@ static bool withStatusRecordLock(AsyncTask *task,
231231 // task will see, we need to do so in some other way, probably via
232232 // atomic objects in the task status records. Because of this, we can
233233 // actually unpublish the lock with a relaxed store.
234- assert (!status.isLocked ());
234+ assert (!status.isStatusRecordLocked ());
235235 status.traceStatusChanged (task);
236236 task->_private ().Status .store (status,
237237 /* success*/ std::memory_order_relaxed);
@@ -271,7 +271,7 @@ bool swift::addStatusRecord(
271271
272272 while (true ) {
273273 // Wait for any active lock to be released.
274- if (oldStatus.isLocked ())
274+ if (oldStatus.isStatusRecordLocked ())
275275 waitForStatusRecordUnlock (task, oldStatus);
276276
277277 // Reset the parent of the new record.
@@ -309,7 +309,7 @@ bool swift::removeStatusRecord(TaskStatusRecord *record) {
309309
310310 while (true ) {
311311 // Wait for any active lock to be released.
312- if (oldStatus.isLocked ())
312+ if (oldStatus.isStatusRecordLocked ())
313313 waitForStatusRecordUnlock (task, oldStatus);
314314
315315 // If the record is the innermost record, try to just pop it off.
@@ -653,9 +653,9 @@ static NearestTaskDeadline swift_task_getNearestDeadlineImpl(AsyncTask *task) {
653653
654654 // If it's locked, wait for the lock; we can't safely step through
655655 // the RecordLockStatusRecord on a different thread.
656- if (oldStatus.isLocked ()) {
656+ if (oldStatus.isStatusRecordLocked ()) {
657657 waitForStatusRecordUnlock (task, oldStatus);
658- assert (!oldStatus.isLocked ());
658+ assert (!oldStatus.isStatusRecordLocked ());
659659 }
660660
661661 // Walk all the records looking for deadlines.
0 commit comments