forked from len0rd/rockbox
current_tick really does need to be volatile since gcc can optimize away checking the value otherwise - found out the hard way. :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13715 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2a0f5a4200
commit
6bba70b0ec
3 changed files with 3 additions and 3 deletions
|
@ -334,7 +334,7 @@ struct plugin_api {
|
|||
#ifdef HAVE_PRIORITY_SCHEDULING
|
||||
void (*priority_yield)(void);
|
||||
#endif
|
||||
long* current_tick;
|
||||
volatile long* current_tick;
|
||||
long (*default_event_handler)(long event);
|
||||
long (*default_event_handler_ex)(long event, void (*callback)(void *), void *parameter);
|
||||
struct thread_entry* threads;
|
||||
|
|
|
@ -93,7 +93,7 @@ struct mutex
|
|||
the current_tick variable */
|
||||
#define current_tick (signed)(USEC_TIMER/10000)
|
||||
#else
|
||||
extern long current_tick;
|
||||
extern volatile long current_tick;
|
||||
#endif
|
||||
|
||||
#ifdef SIMULATOR
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "panic.h"
|
||||
|
||||
#if !defined(CPU_PP) || !defined(BOOTLOADER)
|
||||
long current_tick NOCACHEDATA_ATTR = 0;
|
||||
volatile long current_tick NOCACHEDATA_ATTR = 0;
|
||||
#endif
|
||||
|
||||
static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue