summaryrefslogtreecommitdiff
path: root/Kernel/Console.h
AgeCommit message (Collapse)Author
2019-11-04Kernel: Make File's can_read/can_write take a const FileDescription&Andreas Kling
Asking a File if we could possibly read or write it will never mutate the asking FileDescription&, so it should be const.
2019-11-03Kernel: Prevent kprintf() from asserting in Console::the() (#718)Nicolas Van Bossuyt
This triggered a stack overflow because ubsan can call kprintf() at any time, even before Console is initialized.
2019-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-06-07Kernel: Rename FileDescriptor to FileDescription.Andreas Kling
After reading a bunch of POSIX specs, I've learned that a file descriptor is the number that refers to a file description, not the description itself. So this patch renames FileDescriptor to FileDescription, and Process now has FileDescription* file_description(int fd).
2019-05-28Add clang-format fileRobin Burchell
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
2019-04-29Kernel: Have File virtuals take a FileDescriptor& rather than a Process&.Andreas Kling
This will allow us to implement different behaviors depending on the role of the descriptor a File is being accessed through.
2019-04-03Kernel: Move devices into Kernel/Devices/.Andreas Kling
2019-02-25Kernel: Make syscalls that take a buffer size use ssize_t instead of size_t.Andreas Kling
Dealing with the unsigned overflow propagation here just seems unreasonably error prone. Let's limit ourselves to 2GB buffer sizes instead.
2019-02-15Use modern C++ attributes instead of __attribute__ voodoo.Andreas Kling
This is quite nice, although I wish [[gnu::always_inline]] implied inline. Also "gnu::" is kind of a wart, but whatcha gonna do.
2019-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2019-01-28Expose the kernel log buffer through /proc/dmesg.Andreas Kling
Also add a /bin/dmesg program for convenience.
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-16Pass the process to CharacterDevice::read/write.Andreas Kling
This is much nicer than grabbing directly at 'current' inside a read().
2019-01-16Rename CharacterDevice::has_data_available_for_reading() -> can_read().Andreas Kling
2019-01-15Allow character devices to block write attempts until there is more space.Andreas Kling
2019-01-14Start refactoring the windowing system to use an event loop.Andreas Kling
Userspace programs can now open /dev/gui_events and read a stream of GUI_Event structs one at a time. I was stuck on a stupid problem where we'd reenter Scheduler::yield() due to having one of the has_data_available_for_reading() implementations using locks.
2018-12-03Yet more coding style fixes.Andreas Kling
2018-12-03More coding style changes.Andreas Kling
2018-10-31Add a kmalloc_eternal() for things that will never be destroyed.Andreas Kling
2018-10-30Start working on virtual consoles/TTYs.Andreas Kling
This is a mess right now, but I'd rather commit as I go.
2018-10-28Add save/unsave cursor escape sequences.Andreas Kling
Also added a little terminal test program called /bin/tst.
2018-10-28Add basic support for ANSI color escape sequences.Andreas Kling
2018-10-27Implement 'H' and 'J' escape sequences.Andreas Kling
2018-10-26Add a very hackish /proc/PID/stack.Andreas Kling
It walks the stack and identifies anything that looks like a kernel symbol. This could be a lot more sophisticated.
2018-10-26Add a simple /proc/mounts that enumerates the current VFS mounts.Andreas Kling
2018-10-25Implement a basic way for read() to block.Andreas Kling
FileHandle gets a hasDataAvailableForRead() getter. If this returns true in sys$read(), the task will block(BlockedRead) + yield. The fd blocked on is stored in Task::m_fdBlockedOnRead. The scheduler then looks at the state of that fd during the unblock phase. This makes "sh" restful. :^) There's still some problem with the kernel not surviving the colonel task getting scheduled. I need to figure that out and fix it.
2018-10-23Various things:Andreas Kling
- putch syscall now directly calls Console::putChar(). - /proc/summary includes some info about kmalloc stats. - Syscall entry is guarded by a simple spinlock. - Unmap regions for crashed tasks.
2018-10-21Make Console::m_rows/m_columns const for now.Andreas Kling
2018-10-21Have Console::write() directly call vga_putch.Andreas Kling
2018-10-21Add a Console device and start refactoring screen output.Andreas Kling