summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-04-01 11:33:33 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-04-01 11:33:33 +0000
commit28b061d1e38d2cf5a8a63e431b521051dded123a (patch)
treebea895c1ae0ac856755c510c956952fea51ed003 /firmware
parent9f2b5cce840102f68f93d4de3380075913def3f3 (diff)
downloadrockbox-28b061d1e38d2cf5a8a63e431b521051dded123a.tar.gz
rockbox-28b061d1e38d2cf5a8a63e431b521051dded123a.zip
remove_thread(NULL) contained a null pointer bug causing a crash.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12988 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/thread.c b/firmware/thread.c
index 5cab03e3db..a1c45bb187 100644
--- a/firmware/thread.c
+++ b/firmware/thread.c
@@ -69,10 +69,10 @@ static long cores_locked IBSS_ATTR;
#define LOCK(...) do { } while (test_and_set(&cores_locked, 1))
#define UNLOCK(...) cores_locked = 0
-#warning "Core locking mechanism should be fixed on H10/4G!"
+//#warning "Core locking mechanism should be fixed on H10/4G!"
inline void lock_cores(void)
{
-#if 0
+#if 1
if (!cores[CURRENT_CORE].lock_issued)
{
LOCK();
@@ -83,7 +83,7 @@ inline void lock_cores(void)
inline void unlock_cores(void)
{
-#if 0
+#if 1
if (cores[CURRENT_CORE].lock_issued)
{
cores[CURRENT_CORE].lock_issued = false;
@@ -852,7 +852,7 @@ void remove_thread(struct thread_entry *thread)
lock_cores();
if (thread == NULL)
- thread = cores[IF_COP2(thread->core)].running;
+ thread = cores[CURRENT_CORE].running;
/* Free the entry by removing thread name. */
thread->name = NULL;