1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/thread: don't try to align end of stack

This commit is contained in:
Benjamin Valentin 2024-06-04 16:53:49 +02:00
parent 2576649b52
commit 02fe256a06

View File

@ -178,9 +178,6 @@ uintptr_t measure_stack_free_internal(const char *stack, size_t size)
uintptr_t *stackp = (uintptr_t *)(uintptr_t)stack; uintptr_t *stackp = (uintptr_t *)(uintptr_t)stack;
uintptr_t end = (uintptr_t)stack + size; uintptr_t end = (uintptr_t)stack + size;
/* better be safe than sorry: align end of stack just in case */
end &= (sizeof(uintptr_t) - 1);
/* assume that the stack grows "downwards" */ /* assume that the stack grows "downwards" */
while (((uintptr_t)stackp < end) && (*stackp == (uintptr_t)stackp)) { while (((uintptr_t)stackp < end) && (*stackp == (uintptr_t)stackp)) {
stackp++; stackp++;