summaryrefslogtreecommitdiff
path: root/Kernel/PTYMultiplexer.h
AgeCommit message (Collapse)Author
2019-02-06Bootloader: Locate the kernel's data segment and clear it.Andreas Kling
This was a constant source of stupid bugs and I kept postponing it because I wasn't in the mood to write assembly code. Until now! :^)
2019-01-30Deallocate PTY's when they close.Andreas Kling
This required a fair bit of plumbing. The CharacterDevice::close() virtual will now be closed by ~FileDescriptor(), allowing device implementations to do custom cleanup at that point. One big problem remains: if the master PTY is closed before the slave PTY, we go into crashy land.
2019-01-30Add a /dev/pts filesystem and make PTY allocation dynamic.Andreas Kling
You can now open as many PTY pairs as you like. Well, it's actually capped at 8 for now, but it's just a constant and trivial to change. Unregistering a PTY pair is untested because I didn't want to start mucking with that in Terminal right now.
2019-01-23Move VFS sources into Kernel/.Andreas Kling
2019-01-21Kernel: Make /proc/PID/fds display something useful for character devices.Andreas Kling
2019-01-17Rename SpinLock to Lock. It hasn't been a SpinLock for some time.Andreas Kling
I'm pretty happy with the mechanism of AK::Lock for now.
2019-01-16Add a PTY multiplexer (/dev/ptmx) device.Andreas Kling
When you open /dev/ptmx, you get a file descriptor pointing to one of the available MasterPTY's. If none are available, you get an EBUSY. This makes it possible to open multiple (up to 4) Terminals. :^) To support this, I also added a CharacterDevice::open() that gets control when VFS is opening a CharacterDevice. This is useful when we want to return a custom FileDescriptor like we do here.