1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

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
parent 086f68e878
commit ad92a1e4bc
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);
}
}