Age | Commit message (Collapse) | Author |
|
|
|
It's basically a userspace port of the kernel's Lock class.
Added gettid() and donate() syscalls to support the timeslice donation
feature we already enjoyed in the kernel.
|
|
It takes two parameters, a function pointer for the entry function,
and a void* argument to be passed to that function on the new thread.
|
|
|
|
Only the receive timeout is hooked up yet. You can change the timeout by
calling setsockopt(..., SOL_SOCKET, SO_RCVTIMEO, ...).
Use this mechanism to make /bin/ping report timeouts.
|
|
All ICMP sockets now receive all ICMP packets. All this buffering is gonna
need some limits and such.
|
|
The first userland networking program will be "ping" :^)
|
|
This is a bit more comfortable than passing the shared buffer ID manually
everywhere and keeping track of size etc.
|
|
We don't handle nesting yet, but this is a step in the right direction.
|
|
It's now possible to create symbolic links! :^)
This exposed an issue in Ext2FS where we'd write uninitialized data past
the end of an inode's content. Fix this by zeroing out the tail end of
the last block in a file.
|
|
/bin/cp will now copy the permission bits from source to destination. :^)
|
|
|
|
This makes it more straightforward to build a cross-compiler toolchain.
Also move math stuff from LibC to LibM.
|
|
Move syscall to int 0x82 since using int 0x80 was kinda prone to fork bombs
when building things on Linux. :^)
|
|
Get rid of the convoluted get_arguments and get_environment syscalls.
This patch also adds a simple /bin/env that just prints its environment.
|
|
This accidentally grew into a little bit of VFS cleanup as well.
Also add a simple /bin/ln implementation to exercise it.
|
|
And use this to implement shared bitmaps between WindowServer and clients.
|
|
|
|
One big step towards userspace WindowServer. :^)
|
|
|
|
This is all pretty verbose but I can whittle it down later. :^)
|
|
In order to move the WindowServer to userspace, I have to eliminate its
dependence on system call facilities. The communication channel with each
client needs to be message-based in both directions.
|
|
|
|
I found a cute program that renders an animated nyancat in the terminal.
This patch adds enough hackery to get it working correctly. :^)
|
|
|
|
Only raw octal modes are supported right now.
This patch also changes mode_t from 32-bit to 16-bit to match the on-disk
type used by Ext2FS.
I also ran into EPERM being errno=0 which was confusing, so I inserted an
ESUCCESS in its place.
|
|
It's really only supported in Ext2FS since SynthFS doesn't really want you
mucking around with its files. This is pretty neat though :^)
I ran into some trouble with HashMap while working on this but opted to work
around it and leave that for a separate investigation.
|
|
Implement this functionality by adding global cursor tracking.
It's currently only possible for one GWidget per GWindow to track the cursor.
|
|
Instead of clients painting whenever they feel like it, we now ask that they
paint in response to a paint message.
After finishing painting, clients notify the WindowServer about the rect(s)
they painted into and then flush eventually happens, etc.
This stuff leaves us with a lot of badly named things. Need to fix that.
|
|
|
|
This means we only have to do one fill_rect() per line and the whole process
ends up being ~10% faster than before.
Also added a read_tsc() syscall to give userspace access to the TSC.
|
|
To start painting, call:
gui$get_window_backing_store()
Then finish up with:
gui$release_window_backing_store()
Process will retain the underlying GraphicsBitmap behind the scenes.
This fixes racing between the WindowServer and GUI clients.
This patch also adds a WSWindowLocker that is exactly what it sounds like.
|
|
|
|
This patch adds most of the plumbing for working file deletion in Ext2FS.
Directory entries are removed and inode link counts updated.
We don't yet update the inode or block bitmaps, I will do that separately.
|
|
I'm not in love with this syscall API but it allows me to make progress.
|
|
Now we can block on both the PTY *and* the GUI event stream in Terminal.
|
|
For now, there are four hard-coded PTYs: /dev/pt{m,s}[0123]
Use this in the Terminal to open a pty pair and spawn a shell.
|
|
This is pretty cool. :^)
GraphicsBitmaps are now mapped into both the server and the client address
space (usually at different addresses but that doesn't matter.)
Added a GUI syscall for getting a window's backing store, and another one
for invalidating a window so that the server redraws it.
|
|
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.
|
|
|
|
|
|
Old: Syscall::invoke(Syscall::SC_foo, (dword)arg1, (dword)arg2)
New: syscall(SC_foo, arg1, arg2)
|
|
|
|
It walks all the live Inode objects and flushes pending metadata changes
wherever needed.
This could be optimized by keeping a separate list of dirty Inodes,
but let's not get ahead of ourselves.
|
|
This synchronous approach to inodes is silly, obviously. I need to rework
it so that the in-memory CoreInode object is the canonical inode, and then
we just need a sync() that flushes pending changes to disk.
|
|
The kernel now bills processes for time spent in kernelspace and userspace
separately. The accounting is forwarded to the parent process in reap().
This makes the "time" builtin in bash work.
|
|
|
|
Added a /bin/mkdir that makes directories. How very neat :^)
There are various limitations because of missing functionality.
|
|
|
|
|