1
0
Fork 0
forked from len0rd/rockbox

misc: Ensure stacks are always aligned with the native pointer size.

Change-Id: Ie7efae914dcb43be98bbb71bae9b765b2d87d817
This commit is contained in:
Solomon Peachy 2025-09-05 19:42:00 -04:00
parent 695698b918
commit 16c9ef64b0
8 changed files with 9 additions and 9 deletions

View file

@ -122,9 +122,9 @@ unsigned short power_history[POWER_HISTORY_LEN] = {0};
#if (CONFIG_CPU == JZ4732) || (CONFIG_CPU == JZ4760B) || \
(CONFIG_CPU == X1000) || (CONFIG_PLATFORM & PLATFORM_HOSTED)
static char power_stack[DEFAULT_STACK_SIZE];
static long power_stack[DEFAULT_STACK_SIZE/sizeof(long)];
#else
static char power_stack[DEFAULT_STACK_SIZE/2];
static long power_stack[DEFAULT_STACK_SIZE/2/sizeof(long)];
#endif
static const char power_thread_name[] = "power";

View file

@ -194,7 +194,7 @@ static void scroll_thread(void)
void scroll_init(void)
{
static char scroll_stack[DEFAULT_STACK_SIZE*3];
static long scroll_stack[(DEFAULT_STACK_SIZE*3)/sizeof(long)];
#ifdef HAVE_REMOTE_LCD
queue_init(&scroll_queue, true);
#endif

View file

@ -25,7 +25,7 @@
#include "pca9555.h"
static struct semaphore pca9555_sem;
static char pca9555_thread_stack[DEFAULT_STACK_SIZE];
static long pca9555_thread_stack[DEFAULT_STACK_SIZE/sizeof(long)];
volatile unsigned short pca9555_in_ports;
void INT_GPIO1(void)

View file

@ -195,7 +195,7 @@ unsigned short pmu_read_adc(const struct pmu_adc_channel *ch)
*/
#define Q_EINT 0
static char pmu_thread_stack[DEFAULT_STACK_SIZE/2];
static long pmu_thread_stack[DEFAULT_STACK_SIZE/2/sizeof(long)];
static struct event_queue pmu_queue;
static unsigned char ints_msk[6];

View file

@ -163,7 +163,7 @@ unsigned short pmu_read_adc(const struct pmu_adc_channel *ch)
*/
#define Q_EINT 0
static char pmu_thread_stack[DEFAULT_STACK_SIZE/2];
static long pmu_thread_stack[DEFAULT_STACK_SIZE/2/sizeof(long)];
static struct event_queue pmu_queue;
static unsigned char ints_msk[2];

View file

@ -162,7 +162,7 @@ unsigned short pmu_read_adc(const struct pmu_adc_channel *ch)
*/
#define Q_EINT 0
static char pmu_thread_stack[DEFAULT_STACK_SIZE/2];
static long pmu_thread_stack[DEFAULT_STACK_SIZE/2/sizeof(long)];
static struct event_queue pmu_queue;
static unsigned char ints_msk[3];

View file

@ -68,7 +68,7 @@ static int samples_taken;
static clock_t initial_time, hz;
static char cputime_thread_stack[DEFAULT_STACK_SIZE + 0x100];
static long cputime_thread_stack[(DEFAULT_STACK_SIZE + 0x100)/sizeof(long)];
static char cputime_thread_name[] = "cputime";
static int cputime_threadid;
static void cputime_thread(void);

View file

@ -97,7 +97,7 @@ static unsigned int xruns = 0;
static snd_async_handler_t *ahandler = NULL;
static pthread_mutex_t pcm_mtx;
static char signal_stack[SIGSTKSZ];
static long signal_stack[SIGSTKSZ/sizeof(long)];
static const char *playback_dev = DEFAULT_PLAYBACK_DEVICE;