summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-18WindowServer: Fix build after renaming WSMenuBarKeeper => WSMenuManager.Andreas Kling
2019-07-18Kernel: Remove unnecessary use of LibDraw.Andreas Kling
BXVGADevice was using a Size object for its framebuffer size. We shouldn't be pulling in userspace code in the kernel like this, even if it's just headers. :^)
2019-07-18LibDraw: Introduce (formerly known as SharedGraphics.)Andreas Kling
Instead of LibGUI and WindowServer building their own copies of the drawing and graphics code, let's it in a separate LibDraw library. This avoids building the code twice, and will encourage better separation of concerns. :^)
2019-07-18WindowServer: Rename (files) WSMenuBarKeeper => WSMenuManager.Andreas Kling
2019-07-18WindowServer: Rename WSMenuBarKeeper => WSMenuManager.Andreas Kling
2019-07-18SharedBuffer: Split the creation and share stepsRobin Burchell
This allows us to seal a buffer *before* anyone else has access to it (well, ok, the creating process still does, but you can't win them all). It also means that a SharedBuffer can be shared with multiple clients: all you need is to have access to it to share it on again.
2019-07-18JsonValue: Add to_uint(), to_int() and as_double().Andreas Kling
The to_foo() functions are for converting when you might not be sure of the underlying value type. The as_foo() family assumes that you know exactly what the underlying value type is.
2019-07-18ps: Widen state field to fit "Condition" and other fieldsRobin Burchell
Similar to ab20c91cfb202aeb77298317a87f46a86d706e30.
2019-07-18ps: Port to using CProcessStatisticsReader and /proc/allRobin Burchell
Drop /proc/summary in the process. We only needed one new field here, thankfully, so this was quite straightforward.
2019-07-18CProcessStatisticsReader: Be consistent about terminology from the kernel downRobin Burchell
2019-07-17TextEditor: Show window iconrhin123
2019-07-17LibGUI: Revert GWindowServerConnection to being a singletonRobin Burchell
This was a mistake, of course. Nested event loops don't need (or want) independent server connections. We initialize the connection early in GEventLoop for e.g. users that want to get the size of a GDesktop before the connection has been established. Bug noticed by Andreas, introduced by me ;-)
2019-07-17AudioServer: Use Vector::append(Vector&&) for pending mix buffers.Andreas Kling
Vector::append(Vector&&) is a simple pointer transfer when appending to an empty Vector. :^)
2019-07-17Rename new IPC headers & classesRobin Burchell
Sticking these in a namespace allows us to use a more generic ("Connection") term without clashing, which is way easier to understand than to try to come up with unique names for both.
2019-07-17Port LibGUI to use CIPCClientSideConnectionRobin Burchell
As a consequence, move to use an explicit handshake() method rather than calling virtuals from the constructor. This seemed to not bother AClientConnection, but LibGUI crashes (rightfully) because of it.
2019-07-17Make AClientConnection genericRobin Burchell
2019-07-17WSEventLoop: Remove inheritance from CEventLoopRobin Burchell
The only reason for the inheritance was to add FDs to the select set. Since CNotifier is available (and now also quite useful), we can make use of it instead, and remove the inheritance.
2019-07-17Port WSClientConnection to CIPCServerSideClientRobin Burchell
2019-07-17Introduce CIPCServerSideClientRobin Burchell
As a new base class of IPC connections server-side. Port ASClientConnection to CIPCServerSideClient.
2019-07-17Kernel: Initial FDC Device Driver (#315)Jesse
A basic Floppy Disk Controller device driver for any system later than (and including) the IBM AT. The driver is based on the documentation supplied by QEMU, which is the datasheet for the Intel 82078 Floppy Disk controller (found here: https://wiki.qemu.org/images/f/f0/29047403.pdf) Naturally, floppy disks are a _very_ outdated storage medium, however, as Serenity is a throwback to aesthetic 90s computing, it's a definite must have. Not to mention that there are still a lot of floppy disks around, with countless petabytes of software on them, so it would be nice if people could create images of said disks with serenity. The code for this is mostly clean. however there are a LOT of values specified in the datasheet, so some of them might be wrong, not to mention that the actual specification itself is rather dirt and seemingly hacked together. I'm also only supporting 3.5" floppy disks, without PIO polling (DMA only), so if you want anything more/less than 1.44MB HD Floppys, you'll have to do it yourself.
2019-07-17Kernel: Split SCHEDULER_DEBUG into a new SCHEDULER_RUNNABLE_DEBUGRobin Burchell
And use dbgprintf() consistently on a few of the pieces of logging here. This is useful when trying to track thread switching when you don't really care about what it's switching _to_.
2019-07-17Kernel: Fix a nasty lock bug with exec()Robin Burchell
Exec doesn't leave through the syscall handler, so it didn't unlock the big_lock. This means that reentering can lock it again, and then another thread could endlessly yield waiting to acquire the lock (futilely). This fixes AudioServer using 100% CPU.
2019-07-17LibC: Fix MALLOC_DEBUG to workRobin Burchell
2019-07-17top: Widen "state" field slightly to accomodate "Condition".Andreas Kling
2019-07-17AClientConnection: Fix double exitRobin Burchell
2019-07-17ABuffer: clamp -> clipRobin Burchell
More natural term when talking about audio :)
2019-07-17ABuffer: move it and groove itRobin Burchell
2019-07-17Work on AudioServerRobin Burchell
The center of this is now an ABuffer class in LibAudio. ABuffer contains ASample, which has two channels (left/right) in floating point for mixing purposes, in 44100hz. This means that the loaders (AWavLoader in this case) needs to do some manipulation to get things in the right format, but that we don't need to care after format loading is done. While we're at it, do some correctness fixes. PCM data is unsigned if it's 8 bit, but 16 bit is signed. And /dev/audio also wants signed 16 bit audio, so give it what it wants. On top of this, AudioServer now accepts requests to play a buffer. The IPC mechanism here is pretty much a 1:1 copy-paste from LibGUI/WindowServer. It can be generalized more in the future, but for now I want to get AudioServer working decently first :) Additionally, add a little "aplay" tool to load and play a WAV file. It will break with large WAVs (run out of memory, heh...) but it's a start. Future work needs to make AudioServer block buffer submission from clients until it has played the buffer they are requesting to play.
2019-07-17Kernel: Remove unused Alarm.hAndreas Kling
2019-07-16LibGUI: Add input types to GMessageBox.Andreas Kling
Currently the two available input types are: - GMessageBox::InputType::OK (default) - GMessageBox::InputType::OKCancel Based on your choice, GMessageBox::exec() will return ExecOK or ExecCancel.
2019-07-16WindowServer: Spawn a SystemDialog when activating the shutdown menu.Andreas Kling
This allows us to ask the user for confirmation instead of just shutting down the system abruptly.
2019-07-16SystemDialog: Add a new app for showing system dialogs.Andreas Kling
Currently this will be used by the WindowServer to show some dialogs. This is needed since WindowServer can't use LibGUI and reimplementing message box functionality inside WindowServer would be silly. :^) The only dialog supported in this initial version is --shutdown
2019-07-16Piano: Create the connection after the event loopRobin Burchell
Otherwise it will crash when registering the CNotifier.
2019-07-16CNotifier: Turn into a CObject and Use the event queue to deliver eventsRobin Burchell
This way, CNotifier can mutate state to its little heart's content without destroying the world when the global CNotifier hash changes during delivery.
2019-07-16LibCore: Add a way to mark a socket as blocking (or not)Robin Burchell
If custom I/O is being done outside CIODevice, we need a way to force blocking sometimes. This also fixes the default of CLocalSocket to be non-blocking, the same as CTCPSocket.
2019-07-16SharedBuffer: Fix deadlock on destroyRobin Burchell
We were locking the list of references, and then destroying the reference, which made things go a little crazy. It's more straightforward to just remove the per-reference lock: the syscalls all have to lock the full list anyway, so let's just do that and avoid the hassle. While I'm at it, also move the SharedBuffer code out to its own file as it's getting a little long and unwieldly, and Process.cpp is already huge.
2019-07-16SharedBuffer: fix nullptr dereference on sealRobin Burchell
If the buffer hadn't been used by all participants yet, there wouldn't be a region, which leads to bad things.
2019-07-16CNotifier: Provide a way to unregister a notifier temporarilyRobin Burchell
2019-07-16Kernel: Remove use of [[gnu::pure]].Andreas Kling
I was messing around with this to tell the compiler that these functions always return the same value no matter how many times you call them. It doesn't really seem to improve code generation and it looks weird so let's just get rid of it.
2019-07-16IDEDiskDevice: Remove superstitious memory_barrier().Andreas Kling
2019-07-16CSocket: Also call on_connected for local socket connectionsRobin Burchell
2019-07-16LibCore: Always call on_connected whether the connection was synchronous or notRobin Burchell
It's unreasonable to expect the client to have to call it themselves if the connection was immediate (local).
2019-07-16AK: Add a new TestSuite.h from my own work, adapted to match the existing ↵Robin Burchell
one a bit This gives a few new features: * benchmarks * the ability to run individual testcases easily * timing of tests
2019-07-16Kernel: SharedBuffer sharing cleanupRobin Burchell
Rather than limiting it to two shared processes, store a Vector of references, so we can add more if we want. Makes the code a little more generic. No actual change to the syscall interface yet, so nothing takes advantage of this yet.
2019-07-16BufferStream: Add a function to fully reset stateRobin Burchell
This will allow us to reuse the same buffer with the same stream instance. Needed in AudioServer.
2019-07-16BufferStream: Add signed int overloads for read/writeRobin Burchell
This will be required in AudioServer
2019-07-16TextEditorWidget: Stop dbgprintf from printing nullrhin123
2019-07-16GFilePicker: Changed file_exists MessageBox to warningrhin123
Forgot to remove Error in the title. Going to be replaced by YesNo GMessagebox in the future.
2019-07-16TextEditor: Show window after text_widget loadsrhin123
2019-07-15LogStream: Add a simple-ish mechanism for colorizing and styling output.Andreas Kling
Meet TStyle. It allows you to write things like this: dbg() << TStyle(TStyle::Red, TStyle::Bold) << "Hello, friends!"; Any style used will be reset along with the newline emitted when the dbg() temporary goes out of scope. :^) This can definitely be improved, but I think it's a decent place to start.