-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement loader interface and waiting on process #488
Conversation
roblabla
commented
Sep 22, 2019
- Loader now has an interface to spawn new processes at runtime.
- We can also add Loader to wait until a process is killed.
Use a better lock around thread_maternity.Thread maternity currently uses a SpinLock. We should ideally use a scheduling mutex there. SunriseOS/kernel/src/process.rs Lines 69 to 79 in 898433c
This comment was generated by todo based on a
|
Unify Handle/HandleRef behind a single trait.The fact I have to do this makes me think there's really a problem in the handle/handleref design. Maybe there should be a trait unifying Handle/HandleRef, and `Process` and co should be generic on those? That would allow me to call the functions on "borrowed lifetime-erased" handles. Lines 220 to 230 in 898433c
This comment was generated by todo based on a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
898433c
to
ed5a3a2
Compare
ed5a3a2
to
e7cfcac
Compare
This commit prepares for the signaling system of Processes. It moves various variables that should be changed as a single atomic unit under a single mutex. It also moves the ProcessState to libkern, since it will become user-visible in a future commit.
Avoid deadlocks in Process::start due to the process's state being relocked in Thread::start.
Process is now allowed in wait_synchronization. It gets signaled when its ProcessState changes. The signaled state can be reset with the reset_signal syscall.
Waits until the given pid has exited. launch_title now returns the pid. Shell will now wait until the subprocess has waited before prompting.
e7cfcac
to
7651488
Compare