summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-19Kernel/USB: Make UHCI descriptor pool thread-safeb14ckcat
Right now the TD and QH descriptor pools look to be susceptible to a race condition in the event they are accessed simultaneously by separate threads making USB transfers. This fix does not seem to add any noticeable overhead.
2022-07-19LibDSP: Rename library namespace to DSPkleines Filmröllchen
That's the standard naming convention, but I didn't follow it when originally creating LibDSP and nobody corrected me, so here I am one year later :^)
2022-07-19LibAudio: Rename ConnectionFromClient to ConnectionToServerkleines Filmröllchen
The automatic nomenclature change for IPC sockets got this one wrong.
2022-07-19LaunchServer+SystemServer: Move the portal to a user-specific directoryLucas CHOLLET
Various changes are needed to support this: - The directory is created by Core::Account on login (and located in /tmp). - Service's sockets are now deleted on exit (to allow re-creation) - SystemServer needs to handle SIGTERM to correctly destroy services.
2022-07-19LoginServer: Correctly retrieve SystemServer's exit codeLucas CHOLLET
The returned value of `waitpid` is the PID of the process and not the exit code.
2022-07-19TextEditor: Debounce update_preview() in on_change eventMacDue
This avoids lag spikes when undoing/redoing large chunks of HTML/CSS with the HTML preview open. This had been bugging me when reducing LibWeb issues in the text editor. The debounce timeout is 100ms so the delay should not be noticeable.
2022-07-19LibCore: Add Core::debounce(function, timeout)MacDue
This is a simple helper to debounce a function call, such as an event handler. It avoids the function being called until the event as settled down (i.e. after the timeout).
2022-07-19Kernel/Storage: Remove redundant reference to a controller in IDEChannelLiav A
IDEChannel which is an ATAPort derived class holded a NonnullRefPtr to a parent IDEController, although we can easily defer the usage of it to not be in the IDEChannel code at all, so it allows to keep NonnullRefPtr to the parent ATAController in the ATAPort base class and only there.
2022-07-19Kernel/Storage: Introduce basic abstraction layer for ATA componentsLiav A
This abstraction layer is mainly for ATA ports (AHCI ports, IDE ports). The goal is to create a convenient and flexible framework so it's possible to expand to support other types of controller (e.g. Intel PIIX and ICH IDE controllers) and to abstract operations that are possible on each component. Currently only the ATA IDE code is affected by this, making it much cleaner and readable - the ATA bus mastering code is moved to the ATAPort code so more implementations in the near future can take advantage of such functionality easily. In addition to that, the hierarchy of the ATA IDE code resembles more of the SATA AHCI code now, which means the IDEChannel class is solely responsible for getting interrupts, passing them for further processing in the ATAPort code to take care of the rest of the handling logic.
2022-07-19Kernel/Storage: Move ATA device signature definitions to a general fileLiav A
2022-07-19Kernel/Storage: Merge IDE functionality from BusMasterChannel to ChannelLiav A
This simplifies the flow of how things work currently and is a step for more improvements in the next commits.
2022-07-19Kernel/Storage: Rename ATA.h => Definitions.hLiav A
2022-07-19Kernel/Storage: Move AHCI and IDE code into new subdirectoriesLiav A
We do that to increase clarity of the major and secondary components in the subsystem. To ensure it's even more understandable, we rename the files to better represent the class within them and to remove redundancy in the name. Also, some includes are removed from the general components of the ATA components' classes.
2022-07-19Utilities: Remove the edid-dump utilityLiav A
This short-lived utility was essential when we had to use the ioctl interface to fetch the EDID from a DisplayConnector, but now that we can simply read it from SysFS, this utility is no longer needed and can be removed.
2022-07-19Kernel+Userland: Remove GRAPHICS_IOCTL_GET_HEAD_EDID ioctlLiav A
We are able to read the EDID from SysFS, therefore there's no need to provide this ioctl on a DisplayConnector anymore. Also, now we can simply require the video pledge to be set before doing any ioctl on a DisplayConnector.
2022-07-19Userland: Make graphics_connector_get_head_edid to read EDID from SysFSLiav A
The EDID blob is now exposed in the SysFS for each DisplayConnector, so we don't need to use the ioctl interface anymore to read the EDID.
2022-07-19Kernel/Devices: Abstract SysFS Device add/remove methods more properlyLiav A
It is starting to get a little messy with how each device can try to add or remove itself to either /sys/dev/block or /sys/dev/char directories. To better do this, we introduce 4 virtual methods to take care of that, so until we ensure all nodes in /sys/dev/block and /sys/dev/char are actual symlinks, we allow the Device base class to call virtual methods upon insertion or before being destroying, so it add itself elegantly to either of these directories or remove itself when needed. For special cases where we need to create symlinks, we have two virtual methods to be called otherwise to do almost the same thing mentioned before, but to use symlinks instead.
2022-07-19Kernel/SysFS: Add exposing interface for DisplayConnectorsLiav A
Under normal conditions (when mounting SysFS in /sys), there will be a new directory in the /sys/devices directory called "graphics". For now, under that directory there will be only a sub-directory called "connectors" which will contain all DisplayConnectors' details, each in its own sub-directory too, distinguished in naming with its minor number. Therefore, /sys/devices/graphics/connectors/MINOR_NUMBER/ will contain: - General device attributes such as mutable_mode_setting_capable, double_buffering_capable, flush_support, partial_flush_support and refresh_rate_support. These values are exposed in the ioctl interface of the DisplayConnector class too, but these can be useful later on for command line utilities that want/need to expose these basic settings. - The EDID blob, simply named "edid". This will help userspace to fetch the edid without the need of using the ioctl interface later on.
2022-07-19Utilities/lspci: Don't unveil /res/pci.ids if not asked to resolve IDsLiav A
I tested the grub image under VirtualBox and it appeared that the image didn't have pci.ids file included in the /res directory. In that case it would be expected that lspci can still function correctly if the -n parameter is passed, but then the unveil syscall failed because the file didn't exist. To cope with this, we should allow lspci to work without the pci.ids file being present at the filesystem, so let's not unveil this file if the -n parameter is passed.
2022-07-19Toolchain: Don't pass `-lpthread` when pthreads are requestedTim Schumacher
This is essentially a no-op since we have our replacement linker script, but if we can skip over that entirely, why not?
2022-07-19LibC: Remove the `LibPthread` interface targetTim Schumacher
2022-07-19Everywhere: Fully remove the separate LibPthread directoryTim Schumacher
2022-07-19Tests: Move the LibPthread tests to the correct namespaceTim Schumacher
2022-07-19LibPthread: Move the pthread and semaphore implementation to LibCTim Schumacher
This additionally adds some compatibility code to redirect linking attempts for LibPthread to LibC instead.
2022-07-19Everywhere: Refer to `pthread.h` by its non-prefixed nameTim Schumacher
This removes a bit of noise from the following patches, where we will move the `pthread.h` header out of the `LibPthread` directory.
2022-07-19Ports: Update serenity-theming use latest commit 98ea1b3djwisdom
2022-07-19LibGUI: Add MoveLineUpOrDownCommandLucas CHOLLET
This allows lines moved by Ctrl+Shift+[Up, Down] to be registered as a command, i.e. cancellable by Ctrl+Z. This patch also introduces the usage of TextDocument::[take, insert]_line. Those functions forward changes to the visual lines and then avoid some data mismatch. Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2022-07-19LibGUI: Remove wrong casts in TextDocument.cppLucas CHOLLET
2022-07-19LibGUI: Add TextDocument::take_line(size_t line_index)Lucas CHOLLET
This method is similar in all respects to remove_line except that it returns the removed line.
2022-07-19LibGUI: Add a default virtual destructor to virtual classesLucas CHOLLET
Affected classes are children of TextDocumentUndoCommand: - InsertTextCommand - RemoveTextCommand - ReplaceAllTextCommand
2022-07-19LibGUI: Add VerticalDirection::operator!Lucas CHOLLET
This allows to invert the direction of a VerticalDirection.
2022-07-19Meta: Add Android cross-compile support to LagomAndrew Kaster
This is a start to properly letting us cross-compile Lagom where both the Tools and the BUILD_LAGOM=ON build are using Lagom CMakeLists. The initial cut allows an Android build to succeed, more or less. But there are issues with namespace clashes when using FetchContent with this approach.
2022-07-19LibCore: Add support for compiling for Android with API Version >= 30Andrew Kaster
Most changes are around user and group management, which are exposed in the Android NDK differently than other Unices. We require version 30 for memfd_create, version 28 for posix_spawn, and so on. It's possible a shim for memfd_create could be used, but since Google is mandating new apps use API level 30 as of Nov 2022, this seems suitable.
2022-07-19AK: Add support for building on Android with API version >= 30Andrew Kaster
2022-07-19headless-browser: Simplify the arguments used to select resourcesDexesTTP
We can just infer the favicon, fonts and palette from the location of the /res folder, no need to ask each of the resources one by one.
2022-07-19headless-browser: Split the setters for the screen and the viewport rectDexesTTP
These two represent different things, and should be handled by different methods.
2022-07-19headless-browser: Use port 443 as default for HTTPS requestsDexesTTP
2022-07-19LibWeb: Split WrapperGenerator namespace check into an Array + containsLinus Groh
Also sort the entries alphabetically while we're here :^)
2022-07-19LibWeb: Implement '5.1. Headers class' from the Fetch API :^)Linus Groh
2022-07-19LibWeb: Implement HeaderList::sort_and_combine()Linus Groh
2022-07-19LibWeb: Implement CaseInsensitiveBytesTraits::equals()Linus Groh
Turns out HashTable::contains() doesn't solely use hash() for equality checks, so the lack of a proper equals() implementation broke the check in convert_header_names_to_a_sorted_lowercase_set() and caused duplicate entries in header_names_set.
2022-07-19LibWeb: Prepare WrapperGenerator for Fetch bindingsLinus Groh
2022-07-19LibWeb: Move Fetch infra into the Web::Fetch::Infrastructure namespaceLinus Groh
The Fetch spec unfortunately will cause a name clash between the Request concept and the Request JS object - both cannot live in the Web::Fetch namespace, and WrapperGenerator generally assumes `Web::<Name>` for things living in the `<Name>/` subdirectory, so let's instead move infra code into its own namespace - it already sits in a (sub-)subdirectory anyway.
2022-07-18LibJS: Implement Intl.NumberFormat V3's [[RoundingIncrement]] changesTimothy Flynn
2022-07-18LibJS: Implement Intl.NumberFormat V3's [[RoundingMode]] changesTimothy Flynn
2022-07-18LibJS: Relax integer size requirements on some NumberFormat helpersTimothy Flynn
These were changed to i8 while investigating the issues fixed by commit 9e50f25. When [[RoundingIncrement]] is implemented, some of these will be invoked with [[RoundingIncrement]]'s value, which can be up to 5000. Change these to i32, and wrap them with AK::Checked for good measure. Also change a couple helpers that are always comparing against zero to not need an explicit check.
2022-07-18LibJS: Add missing VERIFY_NOT_REACHED in string-to-enum conversionTimothy Flynn
Noticed this while working on [[RoundingMode]].
2022-07-18LibWeb: Add support for Blob to XHR::send()Kenneth Myhra
2022-07-18LibWeb: Move extract_body() towards spec complianceKenneth Myhra
2022-07-18LibWeb: XHR::extra_body() rewrite to use Variant::visit()Kenneth Myhra