forked from len0rd/rockbox
More const policeing step 3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4982 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
586ec8274d
commit
2b0694c694
9 changed files with 17 additions and 15 deletions
|
|
@ -189,7 +189,7 @@ struct plugin_api {
|
|||
void (*usb_screen)(void);
|
||||
long* current_tick;
|
||||
int (*default_event_handler)(int event);
|
||||
int (*create_thread)(void* function, void* stack, int stack_size, char *name);
|
||||
int (*create_thread)(void* function, void* stack, int stack_size, const char *name);
|
||||
void (*remove_thread)(int threadnum);
|
||||
void (*reset_poweroff_timer)(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
static void backlight_thread(void);
|
||||
static char backlight_stack[DEFAULT_STACK_SIZE];
|
||||
static char backlight_thread_name[] = "backlight";
|
||||
static const char backlight_thread_name[] = "backlight";
|
||||
static struct event_queue backlight_queue;
|
||||
|
||||
static bool charger_was_inserted = 0;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
static int current_channel;
|
||||
static unsigned short adcdata[NUM_ADC_CHANNELS];
|
||||
static unsigned int adcreg[NUM_ADC_CHANNELS] =
|
||||
static const unsigned int adcreg[NUM_ADC_CHANNELS] =
|
||||
{
|
||||
ADDRAH_ADDR, ADDRBH_ADDR, ADDRCH_ADDR, ADDRDH_ADDR,
|
||||
ADDRAH_ADDR, ADDRBH_ADDR, ADDRCH_ADDR, ADDRDH_ADDR
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static bool poweroff = false;
|
|||
static int poweroff_timeout = 2*HZ;
|
||||
#endif
|
||||
static char ata_stack[DEFAULT_STACK_SIZE];
|
||||
static char ata_thread_name[] = "ata";
|
||||
static const char ata_thread_name[] = "ata";
|
||||
static struct event_queue ata_queue;
|
||||
static bool initialized = false;
|
||||
static bool delayed_write = false;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ struct cursorinfo {
|
|||
|
||||
static void scroll_thread(void);
|
||||
static char scroll_stack[DEFAULT_STACK_SIZE];
|
||||
static char scroll_name[] = "scroll";
|
||||
static const char scroll_name[] = "scroll";
|
||||
static char scroll_speed = 8; /* updates per second */
|
||||
static int scroll_delay = HZ/2; /* delay before starting scroll */
|
||||
static int jump_scroll_delay = HZ/4; /* delay between jump scroll jumps */
|
||||
|
|
@ -422,7 +422,7 @@ void lcd_double_height(bool on)
|
|||
lcd_write_command(on?9:8);
|
||||
}
|
||||
|
||||
static char icon_pos[] =
|
||||
static const char icon_pos[] =
|
||||
{
|
||||
0, 0, 0, 0, /* Battery */
|
||||
2, /* USB */
|
||||
|
|
@ -441,7 +441,7 @@ static char icon_pos[] =
|
|||
10, /* Param */
|
||||
};
|
||||
|
||||
static char icon_mask[] =
|
||||
static const char icon_mask[] =
|
||||
{
|
||||
0x02, 0x08, 0x04, 0x10, /* Battery */
|
||||
0x04, /* USB */
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ static volatile int scrolling_lines=0; /* Bitpattern of which lines are scrollin
|
|||
|
||||
static void scroll_thread(void);
|
||||
static char scroll_stack[DEFAULT_STACK_SIZE];
|
||||
static char scroll_name[] = "scroll";
|
||||
static const char scroll_name[] = "scroll";
|
||||
static char scroll_speed = 8; /* updates per second */
|
||||
static int scroll_delay = HZ/2; /* ticks delay before start */
|
||||
static char scroll_step = 6; /* pixels per scroll step */
|
||||
|
|
@ -109,8 +109,8 @@ static int xoffset = 0; /* needed for flip */
|
|||
unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
|
||||
|
||||
/* All zeros and ones bitmaps for area filling */
|
||||
static unsigned char zeros[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static unsigned char ones[8] = { 0xff, 0xff, 0xff, 0xff,
|
||||
static const unsigned char zeros[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static const unsigned char ones[8] = { 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
int lcd_default_contrast(void)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#define MAXTHREADS 10
|
||||
#define DEFAULT_STACK_SIZE 0x400 /* Bytes */
|
||||
|
||||
int create_thread(void* function, void* stack, int stack_size, char *name);
|
||||
int create_thread(void* function, void* stack, int stack_size,
|
||||
const char *name);
|
||||
void remove_thread(int threadnum);
|
||||
void switch_thread(void);
|
||||
void sleep_thread(void);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ extern struct font sysfont;
|
|||
static struct font font_ui;
|
||||
|
||||
/* system font table, in order of FONT_xxx definition */
|
||||
static struct font* sysfonts[MAXFONTS] = { &sysfont, &font_ui };
|
||||
static struct font* const sysfonts[MAXFONTS] = { &sysfont, &font_ui };
|
||||
|
||||
/* static buffer allocation structures */
|
||||
static unsigned char mbuf[MAX_FONT_SIZE];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int num_threads;
|
|||
static volatile int num_sleepers;
|
||||
static int current_thread;
|
||||
static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata")));
|
||||
char *thread_name[MAXTHREADS];
|
||||
const char *thread_name[MAXTHREADS];
|
||||
void *thread_stack[MAXTHREADS];
|
||||
int thread_stack_size[MAXTHREADS];
|
||||
static char main_thread_name[] = "main";
|
||||
|
|
@ -142,7 +142,8 @@ void wake_up_thread(void)
|
|||
* Return ID if context area could be allocated, else -1.
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
int create_thread(void* function, void* stack, int stack_size, char *name)
|
||||
int create_thread(void* function, void* stack, int stack_size,
|
||||
const char *name)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int stacklen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue