summaryrefslogtreecommitdiffstats
path: root/firmware/kernel
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2014-08-16 06:37:29 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-08-16 06:37:29 -0400
commit030f51ce818e06cd35f2e5ada0e7cebb98bfe2d5 (patch)
tree1dbaf59e27c7860edfcf4c5d9eada3d78596ecd0 /firmware/kernel
parent528715a672a53156d7cb1382c344954d4d59cfc6 (diff)
downloadrockbox-030f51ce818e06cd35f2e5ada0e7cebb98bfe2d5.tar.gz
rockbox-030f51ce818e06cd35f2e5ada0e7cebb98bfe2d5.tar.bz2
rockbox-030f51ce818e06cd35f2e5ada0e7cebb98bfe2d5.zip
Oops. Broke an egg. Restore wrongly removed code in mutex.c.
Nice colorful diffs reveals some lines that should NOT have been removed when !defined(HAVE_PRIORITY_SCHEDULING) in mutex_unlock. Change-Id: I4152ea864b7706217c670e1b99250b09e69c5858
Diffstat (limited to 'firmware/kernel')
-rw-r--r--firmware/kernel/mutex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/kernel/mutex.c b/firmware/kernel/mutex.c
index fc49cc6d09..876b704b51 100644
--- a/firmware/kernel/mutex.c
+++ b/firmware/kernel/mutex.c
@@ -103,6 +103,12 @@ void mutex_unlock(struct mutex *m)
}
const int oldlevel = disable_irq_save();
+ /* Tranfer of owning thread is handled in the wakeup protocol
+ * if priorities are enabled otherwise just set it from the
+ * queue head. */
+#ifndef HAVE_PRIORITY_SCHEDULING
+ m->blocker.thread = thread;
+#endif
unsigned int result = wakeup_thread(thread, WAKEUP_TRANSFER);
restore_irq(oldlevel);