From 20ded5c2eb7b51da4e34c40078de2903243ef56f Mon Sep 17 00:00:00 2001 From: Pawel Dziepak Date: Thu, 7 Nov 2013 02:06:42 +0100 Subject: [PATCH] kernel/posix: Do not use thread_block_locked() --- src/system/kernel/posix/xsi_message_queue.cpp | 3 +-- src/system/kernel/posix/xsi_semaphore.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/posix/xsi_message_queue.cpp b/src/system/kernel/posix/xsi_message_queue.cpp index 247a1aeda1..00046cb906 100644 --- a/src/system/kernel/posix/xsi_message_queue.cpp +++ b/src/system/kernel/posix/xsi_message_queue.cpp @@ -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) diff --git a/src/system/kernel/posix/xsi_semaphore.cpp b/src/system/kernel/posix/xsi_semaphore.cpp index a80548a663..5a48f9d28d 100644 --- a/src/system/kernel/posix/xsi_semaphore.cpp +++ b/src/system/kernel/posix/xsi_semaphore.cpp @@ -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)