From f0935d3d20c2624b7c4b70a8e8ad891e516a0641 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 13 Nov 2022 17:40:44 +0200 Subject: give symbolic name to rpc stack ratio --- common/uapi/conf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'common/uapi') diff --git a/common/uapi/conf.c b/common/uapi/conf.c index 596cb5c..dcba6a3 100644 --- a/common/uapi/conf.c +++ b/common/uapi/conf.c @@ -11,6 +11,7 @@ #include #include #include +#include /** \todo stack size should really be set on a per-thread basis, and are the * conf*-syscalls even necessary? */ @@ -83,8 +84,8 @@ SYSCALL_DEFINE2(conf_set)(sys_arg_t param, sys_arg_t val) break; case CONF_CALL_STACK: - size = align_up(val, 4 * BASE_PAGE_SIZE); - if (size < __rpc_stack_size * 4) + size = align_up(val, RPC_STACK_RATIO * BASE_PAGE_SIZE); + if (size < __rpc_stack_size * RPC_STACK_RATIO) return SYS_RET1(ERR_MISC); __call_stack_size = size; @@ -92,7 +93,7 @@ SYSCALL_DEFINE2(conf_set)(sys_arg_t param, sys_arg_t val) case CONF_RPC_STACK: size = align_up(val, BASE_PAGE_SIZE); - if (size > __call_stack_size / 4) + if (size > __call_stack_size / RPC_STACK_RATIO) return SYS_RET1(ERR_MISC); __rpc_stack_size = size; -- cgit v1.3