Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
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. :^)
|
|
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.
|
|
- For division by zero, send SIGFPE.
- For illegal instruction, send SIGILL.
- For the rest, default to SIGSEGV.
|
|
As per the manpage, this acts as a transparent lseek() before write.
|
|
We were already handling this for the indirect blocks, but the direct ones
would happily consider #0 to be a valid block list entry.
|
|
|
|
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. :^)
|
|
resized automatically
Co-Authored-By: Andreas Kling <awesomekling@gmail.com>
|
|
Also expand the QEMU VGA memory size to 64 MB, since otherwise we won't
have enough memory for double-buffering the screen.
|
|
The main cleanup here is putting the I/O address base in a member variable.
|
|
If someone wants to run without this, they can disable it manually :^)
|
|
|
|
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).
|
|
|
|
Otherwise we'll start handing out addresses that are very likely already in
use by existing ranges.
|
|
|
|
|
|
This makes the ELF symbolication crash go away while I work out a smart fix.
|
|
We were copying the raw IPv4 addresses into the wrong part of sockaddr_in,
and we didn't set sa_family or sa_port.
|
|
|
|
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.
|
|
|
|
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.
|
|
Passing this flag to recv() temporarily puts the file descriptor into
non-blocking mode.
Also implement LocalSocket::recv() as a simple forwarding to read().
|
|
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.
|
|
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.
|
|
|
|
This allows us to skip the separate call to set_mmap_name() in code that
we control, e.g malloc() and GraphicsBitmap.
|
|
|
|
This way the socket write buffer sizes are respected, and things that
exceed them get sent EAGAIN.
|
|
|
|
This is another sizable improvement to GCC compile times.
|
|
Also make sure we return any device errors to caller.
|
|
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 :^)
|
|
|
|
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.
|
|
If we just don't do anything, the page fault handler will load the file
incrementally as-needed instead. :^)
|
|
|
|
This would cause it to get scheduled unnecessarily.
|
|
|
|
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.
|
|
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.
|
|
That was not a very graceful looking loop to be stuck in.
|
|
|
|
|