diff options
Diffstat (limited to 'src/uapi')
| -rw-r--r-- | src/uapi/conf.c | 21 | ||||
| -rw-r--r-- | src/uapi/ipc.c | 2 |
2 files changed, 18 insertions, 5 deletions
diff --git a/src/uapi/conf.c b/src/uapi/conf.c index be9abfc..3a45d30 100644 --- a/src/uapi/conf.c +++ b/src/uapi/conf.c @@ -16,11 +16,24 @@ #include <arch/proc.h> -/** \todo stack size should really be set on a per-thread basis, and are the - * conf*-syscalls even necessary? */ -size_t __thread_stack_size = SZ_2M; -size_t __rpc_stack_size = SZ_512K; +/** \todo stack size should probably be set on a per-thread basis */ +/** Current global thread stack size. */ +static size_t __thread_stack_size = SZ_2M; + +/** Current global RPC stack entry size. */ +static size_t __rpc_stack_size = SZ_512K; + + +size_t thread_stack_size() +{ + return __thread_stack_size; +} + +size_t rpc_stack_size() +{ + return __rpc_stack_size; +} /** * Configuration parameter read syscall handler. diff --git a/src/uapi/ipc.c b/src/uapi/ipc.c index 3ac4727..3a28afa 100644 --- a/src/uapi/ipc.c +++ b/src/uapi/ipc.c @@ -133,7 +133,7 @@ static bool __enough_rpc_stack(struct tcb *t) /* if we can still fit an rpc stack into the call stack, we can safely * do the migration. */ - return top - BASE_PAGE_SIZE - __rpc_stack_size >= RPC_STACK_BASE; + return top - BASE_PAGE_SIZE - rpc_stack_size() >= RPC_STACK_BASE; } /** |
