mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[kernel] Stop creating user stacks in the kernel
Stop creating stacks in user space for user threads, that should be done by the thread's creator. This change adds process and stack_top arguments to the thread_create syscall, so that threads can be created in other processes, and given a stack address. Also included is a fix in add_thunk_user due to the r11/flags change. THIS COMMIT BREAKS USERSPACE. See subsequent commits for the user side changes related to this change.
This commit is contained in:
@@ -43,10 +43,10 @@ public:
|
||||
vm_space & space() { return m_space; }
|
||||
|
||||
/// Create a new thread in this process
|
||||
/// \args rsp3 If non-zero, sets the ring3 stack pointer to this value
|
||||
/// \args priority The new thread's scheduling priority
|
||||
/// \args user If true, create a userspace stack for this thread
|
||||
/// \returns The newly created thread object
|
||||
thread * create_thread(uint8_t priorty = default_priority, bool user = true);
|
||||
thread * create_thread(uintptr_t rsp3 = 0, uint8_t priorty = default_priority);
|
||||
|
||||
/// Start tracking an object with a handle.
|
||||
/// \args obj The object this handle refers to
|
||||
|
||||
Reference in New Issue
Block a user