diff options
Diffstat (limited to 'firmware/kernel/mrsw_lock.c')
-rw-r--r-- | firmware/kernel/mrsw_lock.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/kernel/mrsw_lock.c b/firmware/kernel/mrsw_lock.c index 42f43caec3..46ab893622 100644 --- a/firmware/kernel/mrsw_lock.c +++ b/firmware/kernel/mrsw_lock.c @@ -124,8 +124,15 @@ static FORCE_INLINE unsigned int mrsw_writer_wakeup_readers(struct mrsw_lock *mrsw) { mrsw->splay.blocker.thread = NULL; - for (int count = 0; mrsw->queue && mrsw->queue->retval != 0; count++) + int count = 0; + + while (mrsw->queue && mrsw->queue->retval != 0) + { wakeup_thread(&mrsw->queue); + count++; + } + + mrsw->count = count; return THREAD_OK; } |