Kernel: Add sys$get_stack_bounds() for finding the stack base & size

This will be useful when implementing conservative garbage collection.
This commit is contained in:
Andreas Kling 2020-03-16 19:06:33 +01:00
commit ad92a1e4bc
Notes: sideshowbarker 2024-07-19 08:16:32 +09:00
5 changed files with 33 additions and 1 deletions

View file

@ -124,4 +124,11 @@ int shbuf_allow_all(int shbuf_id)
int rc = syscall(SC_shbuf_allow_all, shbuf_id);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int get_stack_bounds(uintptr_t* user_stack_base, size_t* user_stack_size)
{
int rc = syscall(SC_get_stack_bounds, user_stack_base, user_stack_size);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}