-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We now have a new IPC interface, twili::IPipe, representing a pipe on which we can read and write data. Vi now implements the font rendering and other associated logic with terminal handling. It does so by implementing the IPipe interface. We have lost the ability to print colors in the terminal. This will be reinstated in a future commit, which will add ansi escape codes.
- Loading branch information
Showing
14 changed files
with
553 additions
and
287 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# The Twili Service is responsible for providing the stdin/stdout/stderr pipes | ||
# to the various subprocesses. It is freely taken from the [twili] switch | ||
# process. | ||
interface sunrise_libuser::twili::ITwiliService is twili { | ||
# Recover the stdin/stdout/stderr pipes for the current process. | ||
# | ||
# If none were registered, returns an error. | ||
[0] open_pipes(pid) -> ( | ||
object<sunrise_libuser::twili::IPipe> stdin, | ||
object<sunrise_libuser::twili::IPipe> stdout, | ||
object<sunrise_libuser::twili::IPipe> stderr); | ||
} | ||
|
||
# The Twili Manager is responsible for registering a process' pipes. The PM | ||
# should connect to this service and register pipes before starting a process. | ||
interface sunrise_libuser::twili::ITwiliManagerService is twili:m { | ||
# Registers the pipe of a remote process. | ||
[0] register_pipes(pid, | ||
object<sunrise_libuser::twili::IPipe> stdin, | ||
object<sunrise_libuser::twili::IPipe> stdout, | ||
object<sunrise_libuser::twili::IPipe> stderr); | ||
} | ||
|
||
# IPC Pipe Object | ||
interface sunrise_libuser::twili::IPipe { | ||
# Reads data from the pipe. | ||
# | ||
# May block if there isn't enough data to return. | ||
[0] read() -> (u64 size_read, array<u8, 0x6> out_buf); | ||
# Writes data to the other side of the pipe. | ||
# | ||
# May block if the other side isn't reading fast enough. | ||
[1] write(array<u8, 0x5> out_buf); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.