summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-08-15 09:57:10 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2020-08-15 09:57:10 -0400
commit84bfd68fb5fc32debaf95551ffeafb5ea1583033 (patch)
tree6dac296a6f073500c18117d9d45a23e8871e274b /apps/plugins
parenta9ac2d0ba3b01de26944dc6a93c490c89c4ead70 (diff)
downloadrockbox-84bfd68fb5fc32debaf95551ffeafb5ea1583033.tar.gz
rockbox-84bfd68fb5fc32debaf95551ffeafb5ea1583033.tar.bz2
rockbox-84bfd68fb5fc32debaf95551ffeafb5ea1583033.zip
Battery_bench & announce_status stack fix
had stack growing the wrong way Change-Id: I51bf14526f5239e77e15dc0ffd76ad3ed8bdcbc8
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/announce_status.c6
-rw-r--r--apps/plugins/battery_bench.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/announce_status.c b/apps/plugins/announce_status.c
index a1e9f430a8..92f9aa28ec 100644
--- a/apps/plugins/announce_status.c
+++ b/apps/plugins/announce_status.c
@@ -438,7 +438,7 @@ void plugin_buffer_init(void)
{
rb->memset(&gThread, 0, sizeof(gThread));
gThread.buf = rb->plugin_get_buffer(&gThread.buf_size);
- ALIGN_BUFFER(gThread.buf, gThread.buf_size, 4);
+ ALIGN_BUFFER(gThread.buf, gThread.buf_size, sizeof(long));
}
}
@@ -448,9 +448,9 @@ void thread_create(void)
gThread.stacksize = gThread.buf_size;
gThread.buf_size -= gThread.stacksize;
- gThread.stack = (long *) gThread.buf + gThread.buf_size;
+ gThread.stack = (long *) gThread.buf;
- ALIGN_BUFFER(gThread.stack, gThread.stacksize, 4);
+ ALIGN_BUFFER(gThread.stack, gThread.stacksize, sizeof(long));
if (gThread.stacksize < DEFAULT_STACK_SIZE)
{
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 75c448bb27..ff979abd8e 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -656,9 +656,7 @@ enum plugin_status plugin_start(const void* parameter)
rb->memset(buf, 0, buf_size);
gThread.stacksize = buf_size;
- gThread.stack = (long *) buf + buf_size; /* stack grows towards *buf */
-
- ALIGN_BUFFER(gThread.stack, gThread.stacksize, sizeof(long));
+ gThread.stack = (long *) buf;
if (gThread.stacksize < MIN_THREAD_STACK_SIZE)
{