mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +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:
parent
086f68e878
commit
ad92a1e4bc
5 changed files with 33 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -68,4 +68,6 @@ int purge(int mode);
|
|||
|
||||
int perf_event(int type, uintptr_t arg1, uintptr_t arg2);
|
||||
|
||||
int get_stack_bounds(uintptr_t* user_stack_base, size_t* user_stack_size);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue