kernel/posix: Do not use thread_block_locked()

This commit is contained in:
Pawel Dziepak 2013-11-07 02:06:42 +01:00
parent d3e5752b11
commit 20ded5c2eb
2 changed files with 2 additions and 4 deletions

View File

@ -126,12 +126,11 @@ public:
// Unlock the queue before blocking
queueLocker->Unlock();
InterruptsSpinLocker schedulerLocker(gSchedulerLock);
// TODO: We've got a serious race condition: If BlockAndUnlock() returned due to
// interruption, we will still be queued. A WakeUpThread() at this point will
// call thread_unblock() and might thus screw with our trying to re-lock the
// mutex.
return thread_block_locked(thread);
return thread_block();
}
void DoIpcSet(struct msqid_ds *result)

View File

@ -142,12 +142,11 @@ public:
// Unlock the set before blocking
setLocker->Unlock();
InterruptsSpinLocker schedulerLocker(gSchedulerLock);
// TODO: We've got a serious race condition: If BlockAndUnlock() returned due to
// interruption, we will still be queued. A WakeUpThread() at this point will
// call thread_unblock() and might thus screw with our trying to re-lock the
// mutex.
return thread_block_locked(thread);
return thread_block();
}
void Deque(queued_thread *queueEntry, bool waitForZero)