summaryrefslogtreecommitdiff
path: root/Kernel
AgeCommit message (Collapse)Author
2019-05-30Kernel/LibC: Implement sched_* functionality to set/get process priorityRobin Burchell
Right now, we allow anything inside a user to raise or lower any other process's priority. This feels simple enough to me. Linux disallows raising, but that's annoying in practice.
2019-05-30Kernel: Fix a bad printf, and stub out SO_ERROR a bit more fullyRobin Burchell
links requests SO_ERROR, so in not supporting it, things were unhappy. Supporting this properly looks a little messy. I guess Socket will need an m_error member it sets everywhere it returns an error. Or Syscall could set it, perhaps, but I don't know if that's the right thing to do, so let's just stub this for now and file a bug.
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-05-28Kernel: Remove accidentally committer .orig file.Andreas Kling
2019-05-27tiled backgrounds no longer has strange off-by-one pixel errorsChristopher Dumas
2019-05-26IDEDiskDevice: Implement basic DMA writes.Andreas Kling
This could share more code with reads, and generally be better. But it works and it's considerably faster than PIO, so let's use it. :^)
2019-05-26Kernel: Sending a signal to yourself should block until dispatch.Andreas Kling
By moving the sending (and receiving) thread into the BlockedSignal state, we ensure that the thread doesn't continue executing until the signal has been dispatched.
2019-05-26Kernel: Send more specific signals when crashing due to CPU exceptions.Andreas Kling
- For division by zero, send SIGFPE. - For illegal instruction, send SIGILL. - For the rest, default to SIGSEGV.
2019-05-26Kernel: Support O_APPENDRobin Burchell
As per the manpage, this acts as a transparent lseek() before write.
2019-05-25Ext2FS: Block #0 can terminate an inode block list early.Andreas Kling
We were already handling this for the indirect blocks, but the direct ones would happily consider #0 to be a valid block list entry.
2019-05-25Ext2FS: Fix build with EXT2_DEBUG enabled, and tweak some variable names.Andreas Kling
2019-05-24Demos: Start working on a simple WidgetGallery app.Andreas Kling
It's good to have a place where we can try out all the different widgets. This needs some more work on a nice layout, and should also include more of the widgets. :^)
2019-05-24Launcher loads applications from Launcher.ini, is started by default, and is ↵Christopher Dumas
resized automatically Co-Authored-By: Andreas Kling <awesomekling@gmail.com>
2019-05-24WindowServer: Add 2560x1440 resolution option.Andreas Kling
Also expand the QEMU VGA memory size to 64 MB, since otherwise we won't have enough memory for double-buffering the screen.
2019-05-24Kernel: Tidy up IDEDiskDevice a bit.Andreas Kling
The main cleanup here is putting the I/O address base in a member variable.
2019-05-23Always run QEMU with -debugcon stdio.Andreas Kling
If someone wants to run without this, they can disable it manually :^)
2019-05-23Kernel: Return ENOSYS if an invalid syscall number is requested.Andreas Kling
2019-05-23Kernel/AK: Move ELF loader to AKRobin Burchell
This is in preparation for eventually using it in userspace. LinearAddress.h has not been moved for the time being (as it seems to be only used by a very small part of the code).
2019-05-23Kernel: getpeername() should fail with ENOTCONN for non-connected sockets.Andreas Kling
2019-05-22Kernel: Forked children should inherit their RangeAllocator by copy.Andreas Kling
Otherwise we'll start handing out addresses that are very likely already in use by existing ranges.
2019-05-22Kernel: If a signal is ignored, make sure we unset BlockedSignal state.Andreas Kling
2019-05-22Kernel: Dump backtrace on illegal opcode exception.Andreas Kling
2019-05-21Kernel: Bump kernel stacks to 64 KB.Andreas Kling
This makes the ELF symbolication crash go away while I work out a smart fix.
2019-05-20Kernel: Add getpeername() syscall, and fix getsockname() behavior.Andreas Kling
We were copying the raw IPv4 addresses into the wrong part of sockaddr_in, and we didn't set sa_family or sa_port.
2019-05-20Socket: Fix missing kprintf() args in setsockopt().Andreas Kling
2019-05-20Kernel: Let PageDirectory own the associated RangeAllocator.Andreas Kling
Since we transition to a new PageDirectory on exec(), we need a matching RangeAllocator to go with the new directory. Instead of juggling this in Process and MemoryManager, simply attach the RangeAllocator to the PageDirectory instead. Fixes #61.
2019-05-20LocalSocket: Make send() and sendto() work, too.Andreas Kling
2019-05-20LocalSocket: Bump internal buffer sizes to 16KB.Andreas Kling
This gives us some leeway for WindowServer to queue up a bunch of messages for one of its clients. Longer-term we should improve DoubleBuffer to be able to grow dynamically in a way that gets billed to some reasonable place.
2019-05-20Kernel: Add support for recv() with MSG_DONTWAIT.Andreas Kling
Passing this flag to recv() temporarily puts the file descriptor into non-blocking mode. Also implement LocalSocket::recv() as a simple forwarding to read().
2019-05-20LocalSocket: Fix mismatch between can_write() and write() logic.Andreas Kling
can_write() was saying yes in situations where write() would overflow the internal buffer. This patch adds a has_attached_peer() helper to make it easier to understand what's going on in these functions.
2019-05-20Kernel: Report EAGAIN from read() on a non-blocking socket if the buffer is ↵Robin Burchell
empty This is not EOF, and never should have been so -- can trip up other code when porting. Also updates LibGUI and WindowServer which both relied on the old behaviour (and didn't work without changes). There may be others, but I didn't run into them with a quick inspection.
2019-05-19Kernel+LibC: Implement getsockname() syscall.Andreas Kling
2019-05-19LibC: Add mmap_with_name() that names the allocation immediately.Andreas Kling
This allows us to skip the separate call to set_mmap_name() in code that we control, e.g malloc() and GraphicsBitmap.
2019-05-19IDEDiskDevice: Add sysctl variable for turning DMA on/off.Andreas Kling
2019-05-19Kernel: Check can_write for blocking writeRobin Burchell
This way the socket write buffer sizes are respected, and things that exceed them get sent EAGAIN.
2019-05-19Kernel: Add the ability to debug poll/select independently of read/writeRobin Burchell
2019-05-19IDEDiskDevice: Support reading multiple sectors at a time with DMA.Andreas Kling
This is another sizable improvement to GCC compile times.
2019-05-19IDEDiskDevice: Use wait_for_irq() when waiting for DMA transfers.Andreas Kling
Also make sure we return any device errors to caller.
2019-05-19IDEDiskDevice: Add support for DMA reads.Andreas Kling
I've only tested this with the PIIX3 chipset QEMU emulates, but it works pretty well here. GCC compile times are cut roughly in half :^)
2019-05-19Kernel: Remove an unused ELFLoader member.Andreas Kling
2019-05-19Kernel: Remove relocation-related code since it's not used by the kernel.Andreas Kling
If/when we need this in the future, we can bring it back. Right now it's just sitting there making the ELF code look huge when it's not.
2019-05-18Kernel: Don't page in entire file immediately on mmap().Andreas Kling
If we just don't do anything, the page fault handler will load the file incrementally as-needed instead. :^)
2019-05-18FileDescriptor: It's actually okay to seek past the end of a file. :^)Andreas Kling
2019-05-18Kernel: Make sure we never put the colonel thread in the runnable list.Andreas Kling
This would cause it to get scheduled unnecessarily.
2019-05-18Kernel: Add a Thread::set_thread_list() helper to keep logic in one place.Andreas Kling
2019-05-18Kernel: Refactor thread scheduling a bit, breaking it into multiple lists.Andreas Kling
There are now two thread lists, one for runnable threads and one for non- runnable threads. Thread::set_state() is responsible for moving threads between the lists. Each thread also has a back-pointer to the list it's currently in.
2019-05-18Kernel: Fix select with a 0 timeoutRobin Burchell
select essentially has 3 modes (which is presumably why we're finding it so hard to get this right in a reliable way :)). 1. NULL timeout -- no timeout on blocking 2. non-NULL timeout that is not zero'd -- timeout on blocking 3. non-NULL but zero timeout -- no blocking at all (immediate poll) For cases 1 and 2, we want to block the thread. We have a timeout set only for case 2, though. Case 3 should not block the thread, and does not have a timeout set.
2019-05-18Kernel: Don't allow dump_backtrace() to call dump_backtrace().Andreas Kling
That was not a very graceful looking loop to be stuck in.
2019-05-18Kernel: Fail a bit more gracefully when we don't have userspace symbols.Andreas Kling
2019-05-18Kernel: SharedMemory should implement mmap().Andreas Kling