summaryrefslogtreecommitdiff
path: root/Kernel/Syscall.cpp
AgeCommit message (Collapse)Author
2019-05-15Kernel: Add a beep() syscall that beeps the PC speaker.Andreas Kling
Hook this up in Terminal so that the '\a' character generates a beep. Finally emit an '\a' character in the shell line editing code when backspacing at the start of the line.
2019-05-10Kernel: Add a writev() syscall for writing multiple buffers in one go.Andreas Kling
We then use this immediately in the WindowServer/LibGUI communication in order to send both message + optional "extra data" with a single syscall.
2019-05-03Kernel+Userland: Implement mknod() syscall and add a /bin/mknod program.Andreas Kling
2019-05-02Kernel: Emit systrace events for exit, thread_exit and sigreturn.Andreas Kling
Since these syscalls don't return to caller, we have to emit the trace events manually.
2019-04-29Kernel+LibC: Add exit_thread() syscall.Andreas Kling
2019-04-22Kernel: Add a systrace() syscall and implement /bin/strace using it.Andreas Kling
Calling systrace(pid) gives you a file descriptor with a stream of the syscalls made by a peer process. The process must be owned by the same UID who calls systrace(). :^)
2019-04-17Kernel+ProcessManager: Show per-process syscall counts.Andreas Kling
Added a simple syscall counter to the /proc/all contents. :^)
2019-04-09Kernel: More work towards POSIX SHM, also add ftruncate().Andreas Kling
2019-04-08Kernel+LibC: Add stubs for POSIX shared memory API.Andreas Kling
Specifically shm_open() and shm_unlink(). This patch just adds stubs.
2019-04-07Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.Andreas Kling
2019-04-01Kernel: Add a blunt big process lock.Andreas Kling
We can't have multiple threads in the same process running in the kernel at the same time, so let's have a per-process lock that threads have to acquire on syscall entry/exit (and yield while blocked.)
2019-03-25LibGUI+Kernel: Add a GLock class (userspace mutex.)Andreas Kling
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.
2019-03-23Kernel+LibC: Add a simple create_thread() syscall.Andreas Kling
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.
2019-03-23Kernel: Introduce threads, and refactor everything in support of it.Andreas Kling
The scheduler now operates on threads, rather than on processes. Each process has a main thread, and can have any number of additional threads. The process exits when the main thread exits. This patch doesn't actually spawn any additional threads, it merely does all the plumbing needed to make it possible. :^)
2019-03-14Kernel: Remove leftover debug spam when returning from mkdir() syscall.Andreas Kling
2019-03-13Add support for socket send/receive timeouts.Andreas Kling
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.
2019-03-12Kernel+LibC+Userland: Yet more networking bringup hacking.Andreas Kling
All ICMP sockets now receive all ICMP packets. All this buffering is gonna need some limits and such.
2019-03-12Kernel+LibC+Userland: Start working on an IPv4 socket backend.Andreas Kling
The first userland networking program will be "ping" :^)
2019-03-08Add a C++ helper class for working with shared buffers.Andreas Kling
This is a bit more comfortable than passing the shared buffer ID manually everywhere and keeping track of size etc.
2019-03-05Kernel: Block a signal from being dispatched again until handler returns.Andreas Kling
We don't handle nesting yet, but this is a step in the right direction.
2019-03-02Kernel+Userland: Add symlink() syscall and add "-s" flag to /bin/ln.Andreas Kling
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.
2019-03-01Kernel+Userland: Implement fchmod() syscall and use it to improve /bin/cp.Andreas Kling
/bin/cp will now copy the permission bits from source to destination. :^)
2019-02-27Add chown() syscall and a simple /bin/chown program.Andreas Kling
2019-02-27More compat work towards porting vim.Andreas Kling
It now builds and runs in the small-featureset configuration. :^)
2019-02-26More compat work.Andreas Kling
Move syscall to int 0x82 since using int 0x80 was kinda prone to fork bombs when building things on Linux. :^)
2019-02-25More moving towards using signed types.Andreas Kling
I'm still feeling this out, but I am starting to like the general idea.
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-22Kernel: Pass process arguments directly on the stack.Andreas Kling
Get rid of the convoluted get_arguments and get_environment syscalls. This patch also adds a simple /bin/env that just prints its environment.
2019-02-21Kernel: Add link() syscall to create hard links.Andreas Kling
This accidentally grew into a little bit of VFS cleanup as well. Also add a simple /bin/ln implementation to exercise it.
2019-02-16Kernel: Add a simple shared memory API for two processes only.Andreas Kling
And use this to implement shared bitmaps between WindowServer and clients.
2019-02-14LibC: Add socket(), bind(), listen(), accept() and connect().Andreas Kling
2019-02-14WindowServer: Convert entire API to be message-based.Andreas Kling
One big step towards userspace WindowServer. :^)
2019-02-13WindowServer: Convert the remaining menu APIs into messages.Andreas Kling
2019-02-13WindowServer: Refactor more of the menu APIs to be message-based.Andreas Kling
This is all pretty verbose but I can whittle it down later. :^)
2019-02-13WindowServer: Begin refactoring towards a fully asynchronous protocol.Andreas Kling
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.
2019-02-12Add API's and plumbing for WindowServer clients to make menus.Andreas Kling
2019-02-06Clean up some uninteresting log spam.Andreas Kling
2019-02-03Get nyancat nyanning in Serenity.Andreas Kling
I found a cute program that renders an animated nyancat in the terminal. This patch adds enough hackery to get it working correctly. :^)
2019-01-31Big, possibly complete sweep of naming changes.Andreas Kling
2019-01-29Implement basic chmod() syscall and /bin/chmod helper.Andreas Kling
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.
2019-01-28Add support for removing directories.Andreas Kling
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.
2019-01-27Make buttons unpress when the cursor leaves the button rect.Andreas Kling
Implement this functionality by adding global cursor tracking. It's currently only possible for one GWidget per GWindow to track the cursor.
2019-01-26Refactor GUI rendering model to be two-phased.Andreas Kling
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.
2019-01-25Terminal: Redraw entire line if any of its characters are dirty.Andreas Kling
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.
2019-01-24Let userland retain the window backing store while drawing into it.Andreas Kling
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.
2019-01-23Stub out poll() syscall and LibC wrapper.Andreas Kling
2019-01-23Kernel: Get rid of Unix namespace.Andreas Kling
This is no longer needed as the Kernel can stand on its own legs now and there won't be any conflict with host system data types.
2019-01-22Add unlink() syscall and /bin/rm.Andreas Kling
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.
2019-01-22Kernel: Support open() with O_CREAT.Andreas Kling
It's now possible to create zero-length files! :^) Also hook up the new functionality in /bin/touch.
2019-01-20Make it possible for userspace to alter window title/geometry.Andreas Kling
I'm not in love with this syscall API but it allows me to make progress.