mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 17:17:38 +00:00
Unify stack alignment among all platforms
The alignment is now done in Thread_base::Context. Implementations are forced to use Context::stack_top(), which aligns the stack top.
This commit is contained in:
@ -123,7 +123,7 @@ void Thread_base::start()
|
||||
}
|
||||
|
||||
/* align initial stack to 16 byte boundary */
|
||||
void *thread_sp = (void *)((addr_t)(_context->stack) & ~0xf);
|
||||
void *thread_sp = (void *)((addr_t)(stack_top()) & ~0xf);
|
||||
_tid.tid = lx_create_thread(Thread_base::_thread_start, thread_sp, this);
|
||||
_tid.pid = lx_getpid();
|
||||
|
||||
|
@ -54,9 +54,7 @@ void Thread_base::_deinit_platform_thread() { }
|
||||
|
||||
void Thread_base::start()
|
||||
{
|
||||
/* align initial stack to 16 byte boundary */
|
||||
void *thread_sp = (void *)((addr_t)(_context->stack) & ~0xf);
|
||||
_tid.tid = lx_create_thread(Thread_base::_thread_start, thread_sp, this);
|
||||
_tid.tid = lx_create_thread(Thread_base::_thread_start, stack_top(), this);
|
||||
_tid.pid = lx_getpid();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user