From 7b4eb44395bced7073e37d0b8b0d83fb2f518482 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 27 Dec 2010 10:05:09 +0000 Subject: Certain data accesses in the kernel should have volatile semantics to be correct and not rely on the whims of the compiler. Change queue clearing to simply catch read up to write rather than reset both to 0 to ensure sane results for queue_count and queue_empty with concurrency. Binsize may or may not increase a bit depending upon whether the output was as intended in all places; wrong stuff was already unlikely to cause any issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28909 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/export/thread.h') diff --git a/firmware/export/thread.h b/firmware/export/thread.h index 87c2d2d..ba777dc 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h @@ -269,7 +269,7 @@ struct thread_entry /* Only enabled when using queue_send for now */ #endif #if defined(HAVE_EXTENDED_MESSAGING_AND_NAME) || NUM_CORES > 1 - intptr_t retval; /* Return value from a blocked operation/ + volatile intptr_t retval; /* Return value from a blocked operation/ misc. use */ #endif #ifdef HAVE_PRIORITY_SCHEDULING -- cgit v1.1