libc: make app stack size configurable

This patch changes the libc to query the stack size from the
config attribute <libc> <stack size=""/> </libc> for regular
components, not only cloned processes.
This commit is contained in:
Norman Feske 2022-05-04 14:05:17 +02:00 committed by Christian Helmuth
parent cacb6136fa
commit 16cf1f48d3

@ -46,11 +46,9 @@ inline void Libc::Main_blockade::wakeup()
size_t Libc::Kernel::_user_stack_size()
{
size_t size = Component::stack_size();
if (!_cloned)
return size;
_libc_env.libc_config().with_sub_node("stack", [&] (Xml_node stack) {
size = stack.attribute_value("size", 0UL); });
size = stack.attribute_value("size", Number_of_bytes(0)); });
return size;
}