summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-22LibWasm: Push call results back in reverse order to preserve stack orderAli Mohammad Pur
2022-04-22LibWasm: Make memory_grow validation push back the old memory sizeAli Mohammad Pur
2022-04-22LibWasm: Make local_tee validation keep the value on the stackAli Mohammad Pur
2022-04-22Kernel/USB: Send correct data for Root Hub Configuration DescriptorJesse Buhagiar
A request of `GET_DESCRIPTOR` should be sending the entire configuration chain, and not just the configuration descriptor.
2022-04-22Kernel/USB: Get all interface descriptors on enumerationJesse Buhagiar
This creates all interfaces when the device is enumerated, with a link to the configuration that it is a part of. As such, a new class, `USBInterface` has been introduced to express this state.
2022-04-22Kernel/USB: Add new `USBHIDDescriptor` typeJesse Buhagiar
2022-04-22Kernel/USB: Add `control_transfer()` function `USB::Device`Jesse Buhagiar
Some other parts of the USB stack may require us to perform a control transfer. Instead of abusing `friend` to expose the default pipe, let's just expose it via a function.
2022-04-22Kernel/USB: Fetch configuration descriptors on enumerationJesse Buhagiar
This also introduces a new class, `USBConfiguration` that stores a configuration. The device, when instructed, sets this configuration and holds a pointer to it so we have a record of what configuration is currently active.
2022-04-22LibRegex: Check inverse_matched after every op, not just at the endAli Mohammad Pur
Fixes #13755. Co-Authored-By: Damien Firmenich <fir.damien@gmail.com>
2022-04-22Documentation+SQLStudio: Add manual page for SQL StudioDylan Katz
2022-04-22Base: Add launcher for SQL StudioDylan Katz
2022-04-22DevTools: Introduce SQL StudioDylan Katz
SQL Studio is a graphical SQL manager program that allows the user to create and edit SQL scripts.
2022-04-22Base: Add icons for SQL StudioDylan Katz
2022-04-21PixelPaint: Add a histogram widgetTorstennator
This adds a simple histogram widget that visualizes the rgb-channels and brightness for a given image. When hovering over the image it will indicate what brightness level the pixel at the mouse position has.
2022-04-21LibGUI+Applications: Add --open-tab option to FooSettings applicationsSam Atkins
Similar to SystemMonitor's option of the same name, this allows you to launch the given application with the specific tab open.
2022-04-21LibGUI+Applications: Give SettingsWindow tabs a string IDSam Atkins
This gives us a convenient way to refer to them, which will be used in the following commit.
2022-04-21LibCore: Output invalid DateTime::to_string() specifiers as literalsSam Atkins
While working on #13764 I noticed that DateTime::to_string() would just return an empty String if the format included an invalid specifier (eg `%Q`). This seems to be a mistake. POSIX date(1), which I believe we are basing our implementation on, only replaces valid specifiers, and any invalid ones get included as literals in the output. For example, on Linux `date "+%Quiz"` returns "%Quiz", but we were returning "".
2022-04-21Kernel: Allow sys$bind() on local sockets with short socket addressAndreas Kling
Previously, we required local socket addresses to be exactly sizeof(sockaddr_un). There was no real reason for this, so let's not enforce it.
2022-04-21Kernel: Report AF_UNIX address family when accepting local socketsAndreas Kling
Previously we just wrote the local socket bind path into the sockaddr_un buffer. With this patch, we actually report the family as well.
2022-04-21AudioServer: Auto-pause new clientskleines Filmröllchen
This fixes a bunch of audio clients that don't actually play audio.
2022-04-21LibAudio+Userland: Use new audio queue in client-server communicationkleines Filmröllchen
Previously, we were sending Buffers to the server whenever we had new audio data for it. This meant that for every audio enqueue action, we needed to create a new shared memory anonymous buffer, send that buffer's file descriptor over IPC (+recfd on the other side) and then map the buffer into the audio server's memory to be able to play it. This was fine for sending large chunks of audio data, like when playing existing audio files. However, in the future we want to move to real-time audio in some applications like Piano. This means that the size of buffers that are sent need to be very small, as just the size of a buffer itself is part of the audio latency. If we were to try real-time audio with the existing system, we would run into problems really quickly. Dealing with a continuous stream of new anonymous files like the current audio system is rather expensive, as we need Kernel help in multiple places. Additionally, every enqueue incurs an IPC call, which are not optimized for >1000 calls/second (which would be needed for real-time audio with buffer sizes of ~40 samples). So a fundamental change in how we handle audio sending in userspace is necessary. This commit moves the audio sending system onto a shared single producer circular queue (SSPCQ) (introduced with one of the previous commits). This queue is intended to live in shared memory and be accessed by multiple processes at the same time. It was specifically written to support the audio sending case, so e.g. it only supports a single producer (the audio client). Now, audio sending follows these general steps: - The audio client connects to the audio server. - The audio client creates a SSPCQ in shared memory. - The audio client sends the SSPCQ's file descriptor to the audio server with the set_buffer() IPC call. - The audio server receives the SSPCQ and maps it. - The audio client signals start of playback with start_playback(). - At the same time: - The audio client writes its audio data into the shared-memory queue. - The audio server reads audio data from the shared-memory queue(s). Both sides have additional before-queue/after-queue buffers, depending on the exact application. - Pausing playback is just an IPC call, nothing happens to the buffer except that the server stops reading from it until playback is resumed. - Muting has nothing to do with whether audio data is read or not. - When the connection closes, the queues are unmapped on both sides. This should already improve audio playback performance in a bunch of places. Implementation & commit notes: - Audio loaders don't create LegacyBuffers anymore. LegacyBuffer is kept for WavLoader, see previous commit message. - Most intra-process audio data passing is done with FixedArray<Sample> or Vector<Sample>. - Improvements to most audio-enqueuing applications. (If necessary I can try to extract some of the aplay improvements.) - New APIs on LibAudio/ClientConnection which allows non-realtime applications to enqueue audio in big chunks like before. - Removal of status APIs from the audio server connection for information that can be directly obtained from the shared queue. - Split the pause playback API into two APIs with more intuitive names. I know this is a large commit, and you can kinda tell from the commit message. It's basically impossible to break this up without hacks, so please forgive me. These are some of the best changes to the audio subsystem and I hope that that makes up for this :yaktangle: commit. :yakring:
2022-04-21LibAudio+Everywhere: Rename Audio::Buffer -> Audio::LegacyBufferkleines Filmröllchen
With the following change in how we send audio, the old Buffer type is not really needed anymore. However, moving WavLoader to the new system is a bit more involved and out of the scope of this PR. Therefore, we need to keep Buffer around, but to make it clear that it's the old buffer type which will be removed soon, we rename it to LegacyBuffer. Most of the users will be gone after the next commit anyways.
2022-04-21LibIPC: Allow transporting a SharedCircularQueue over IPCkleines Filmröllchen
2022-04-21LibCore: Introduce SharedSingleProducerCircularQueuekleines Filmröllchen
This new class with an admittedly long OOP-y name provides a circular queue in shared memory. The queue is a lock-free synchronous queue implemented with atomics, and its implementation is significantly simplified by only accounting for one producer (and multiple consumers). It is intended to be used as a producer-consumer communication datastructure across processes. The original motivation behind this class is efficient short-period transfer of audio data in userspace. This class includes formal proofs of several correctness properties of the main queue operations `enqueue` and `dequeue`. These proofs are not 100% complete in their existing form as the invariants they depend on are "handwaved". This seems fine to me right now, as any proof is better than no proof :^). Anyways, the proofs should build confidence that the implemented algorithms, which are only roughly based on existing work, operate correctly in even the worst-case concurrency scenarios.
2022-04-21Kernel: Don't require AnonymousFiles to be mmap'd completelykleines Filmröllchen
AnonymousFile always allocates in multiples of a page size when created with anon_create. This is especially an issue if we use AnonymousFile shared memory to store a shared data structure that isn't exactly a multiple of a page in size. Therefore, we can just allow mmaps of AnonymousFile to map only an initial part of the shared memory. This makes SharedSingleProducerCircularQueue work when it's introduced later.
2022-04-21AK: Allow alignment to cache line size with CACHE_ALIGNEDkleines Filmröllchen
This is particularly important to avoid false sharing, which thrashes performance when two process-shared atomics are on the same cache line.
2022-04-21SystemServer: Boot into graphical mode even if there's no video hardwarekleines Filmröllchen
SystemServer had safety fallbacks to boot into text mode if the user errorneously specified graphical mode but no video hardware was present. As it's now possible to do exactly this intentionally, we should allow it. This would of course make WindowServer fall over and die if configured improperly, but if you're messing with the kernel command line in strange ways, you should be able to fix that.
2022-04-21WindowServer: Create the VirtualScreenBackendkleines Filmröllchen
This screen backend is just memory-backed and doesn't connect to any screen hardware. That way, we can boot Serenity without video hardware but in full graphical mode :^) To create a virtual screen, put something like this in your WindowServer.ini. There's no way yet to do this through Display Settings, though an existing virtual screen's settings can be changed there. ```ini [Screen0] Mode=Virtual Left=1024 Top=0 Width=1920 Height=1080 ScaleFactor=1 ```
2022-04-21WindowServer: Add the screen mode property in the screen configurationkleines Filmröllchen
This will allow us to change between a couple of properties, for now it's only Device and Virtual. (How about Remote :^) ) These get handled by a different screen backend in the Screen.
2022-04-21WindowServer: Make Screen use ScreenBackendkleines Filmröllchen
This will allow us to use other screen backends in the future instead.
2022-04-21WindowServer: Introduce the ScreenBackend conceptkleines Filmröllchen
The ScreenBackend is a thin wrapper around the actual screen hardware connection. It contains all the variables specific to that hardware and abstracts away operations that deal with controlling the hardware. The standard ScreenBackend implementor is HardwareScreenBackend, which contains all the existing frame buffer & ioctl handling code of Screen. I took this opportunity to introduce ErrorOr wherever sensible.
2022-04-21WindowServer: Rename fb_data and friends to flush_rect etckleines Filmröllchen
This was very badly named. All that the "FBData" struct contains is the currently to-be-flushed rectangles plus a fullness flag, so it should better be called FlushRectData. This rename is similarly applied to all variable names.
2022-04-21netstat: Add the wide flag optionbrapru
Previously netstat would print the whole line of an ip address or resolved hostname. If the hostname was longer than the address column length, it would push following columns into disaligned output. This sets the default behavior to truncate any IP address or symbolic hostname that is larger than the maximum address column size to provide cleaner output. In the event the user wishes to see the whole address name, they can then pass the wide option that will output as wide as necessary to print the whole name.
2022-04-21netstat: Add hostname resolutionbrapru
2022-04-21arp: Add hostname resolutionbrapru
2022-04-21Kernel: Limit free space between randomized memory allocationsTim Schumacher
2022-04-21AK: Expose RedBlackTree::find_smallest_not_below()Tim Schumacher
2022-04-21LibC: Stub out posix_memalign()Andreas Kling
2022-04-21LibC: Make nameinfo (NI_*) constants bitfield-friendlyAndreas Kling
These are supposed to be used as flags in a bitfield, so let's make them powers of two.
2022-04-21LibC: Implement errno via a __errno_location() functionAndreas Kling
This matches how some other systems implement errno, and makes 3rd party software that expect us to have __errno_location() work.
2022-04-21Shell: Highlight commands with a hyperlink to open their help pagesForLoveOfCats
2022-04-21LaunchServer+Help: Open `help` urls with HelpForLoveOfCats
2022-04-21AK: Make `Vector::contains_slow` templatedForLoveOfCats
This allows for calling this function with any argument type for which the appropriate traits and operators have been implemented so it can be compared to the Vector's item type
2022-04-21AK: Add `URL::create_with_help_scheme` helper functionForLoveOfCats
2022-04-20LibWeb: Fix various spec comment inconsistenciesLinus Groh
- Don't add multiple numbers to nested steps, just the innermost one (as rendered in the HTML document) - "Otherwise" comments go before the else, not after it - "FIXME:" goes before step number, not between it and the comment text - Always add a period between number and comment text The majority of these were introduced in #13756, but some unrelated ones have been updated as well.
2022-04-20Kernel: Take WorkQueue item as reference instead of pointer in do_queueLiav A
2022-04-20Kernel: Allow WorkQueue items allocation failures propagationLiav A
In most cases it's safe to abort the requested operation and go forward, however, in some places it's not clear yet how to handle these failures, therefore, we use the MUST() wrapper to force a kernel panic for now.
2022-04-20Kernel: Move VMWareBackdoor to new directory in the Firmware directoryLiav A
2022-04-20Ports: Exclude non-working utilities from the coreutils installationTim Schumacher
2022-04-20Base: Update GruvboxDark Theme and enable window-close-modified icondjwisdom