diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/announce_status.c | 6 | ||||
-rw-r--r-- | apps/plugins/battery_bench.c | 4 |
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) { |