sched: implement user-configurable fs and gs segment base addresses
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <kernel/sched.h>
|
||||
|
||||
struct ml_thread {
|
||||
virt_addr_t tr_gsbase, tr_fsbase;
|
||||
};
|
||||
|
||||
struct ml_cpu_context;
|
||||
|
||||
/* switch from one thread to another. the stack of the `to` thread must have
|
||||
@@ -28,4 +32,15 @@ extern kern_status_t ml_thread_prepare_user_context(
|
||||
const uintptr_t *args,
|
||||
size_t nr_args);
|
||||
|
||||
extern kern_status_t ml_thread_config_get(
|
||||
struct thread *thread,
|
||||
kern_config_key_t key,
|
||||
void *out,
|
||||
size_t max);
|
||||
extern kern_status_t ml_thread_config_set(
|
||||
struct thread *thread,
|
||||
kern_config_key_t key,
|
||||
const void *ptr,
|
||||
size_t len);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user