summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-11Applets/ResourceGraph: Propagate errors in create_appletcreator1creeper1
We now return an error if we fail to parse the applet spec in the expected format. We can now also use try_set_main_widget instead of set_main_widget.
2022-01-11LibCore+flock: Make Core::System::waitpid more ergonomicJunior Rantila
2022-01-11LibGUI: Don't paint text cursor if TextEditor is disabledMarcus Nilsson
This looked a bit odd in the rare case of disabling a focused TextEditor.
2022-01-11LibGUI: Change gradient colors when ValueSlider is disabledMarcus Nilsson
Make it more obivous when ValueSlider is disabled by changing the gradient colors.
2022-01-11Ports: Add Half-Life Port :^)Jesse Buhagiar
Add a port of Half-Life, the classic game by VALVe Software
2022-01-11Ports: Add mold portAndrew Kaster
The port exposes some dynamic loader and toolchain shortcomings, namely RTLD_NEXT, RTLD_NOLOAD, and std::filesystem. Hopefully we can discover a ton of multi-threading bugs in Serenity with this port :^)
2022-01-11LibC: Add daemon(3) implementation to match behavior of Linux and BSDsAndrew Kaster
This helper that originally appeared in 4.4BSD helps to daemonize a process by forking, setting itself as session leader, chdir to "/" and closing stdin/stdout.
2022-01-11Base: Add add Arrows to font Katica Regular 10Lady Gegga
21AD, 21AE, 21BC-21FF https://www.unicode.org/charts/PDF/U2190.pdf
2022-01-11Base: Adjust 21B9, 2190, 2192, 219D, 219C in font Katica Regular 10Lady Gegga
Adjust them (make them a bit wider) for clearity.
2022-01-11Base: Add Supplemental Arrows-A to font Katica Regular 10Lady Gegga
27F0-27FF https://www.unicode.org/charts/PDF/U27F0.pdf
2022-01-11Base: Add Unified Canadian Aboriginal Syllabics Ext. to KaticaReg.10Lady Gegga
18B0-18F5 https://www.unicode.org/charts/PDF/U18B0.pdf
2022-01-10Base: Add 30EC8, 30ED5, 8E47, 96AC, 9C7B to font CJK BiángLady Gegga
2022-01-10Base: Add 7228, 9F96, 2A6A5 to font CJK BiángLady Gegga
2022-01-10Base: Add new bitmap font CJK BiángLady Gegga
2022-01-11AK+Kernel: Remove one_ref_left() footgunAndreas Kling
This mechanism was unsafe to use in any multithreaded context, since the hook function was invoked on a raw pointer *after* decrementing the local ref count. Since we don't use it for anything anymore, let's just get rid of it.
2022-01-11Kernel: Synchronize removals from TmpFS inode mapAndreas Kling
Previously we were uncaching inodes from TmpFSInode::one_ref_left(). This was not safe, since one_ref_left() was effectively being called on a raw pointer after decrementing the local ref count and observing it become 1. There was a race here where someone else could trigger the destructor by unreffing to 0 before one_ref_left() got called, causing us to call one_ref_left() on a deleted inode. We fix this by using the new remove_from_secondary_lists() mechanism in ListedRefCounted and synchronizing all access to the TmpFS inode map with the main Inode::all_instances() lock. There's probably a nicer way to solve this.
2022-01-11Kernel: Make ListedRefCounted::unref() call optional list removal helperAndreas Kling
Look for remove_from_secondary_lists() and call it on the ref-counting target if present *while the lock is held*. This allows listed-ref-counted objects to be present in multiple lists and still have synchronized removal on final unref.
2022-01-11Kernel: Remove empty Ext2FSInode::one_ref_left()Andreas Kling
2022-01-11Kernel: Remove empty ISO9660Inode::one_ref_left()Andreas Kling
2022-01-11LibTimeZone: Begin generating GMT offset rules for each time zoneTimothy Flynn
This is a rather naive implementation, but serves as a first pass at determining the GMT offset for a time zone at a particular point in time. This implementation ignores DST (because we are not parsing any RULE entries yet), and ignores any offset patterns of the form "Mon>4" or "lastSun".
2022-01-11LibTimeZone: Add methods to canonicalize a time zone nameTimothy Flynn
2022-01-11LibTimeZone: Add method to convert a time zone to a stringTimothy Flynn
2022-01-11LibTimeZone: Perform time-zone-from-string lookups case insensitivelyTimothy Flynn
Time zone names in the TZDB are defined to be case insensitive.
2022-01-11LibTimeZone: Add a unit test for generated time zone dataTimothy Flynn
2022-01-11LibTimeZone: Tweak the enumeration generated for parsed time zonesTimothy Flynn
For example, generate "Etc/GMT+12" as "Etc_GMT_Ahead_12" (instead of as "Etc_GMT_P12"). A little clearer what the name means without having to know off-hand what "P" was representing.
2022-01-11LibTimeZone: Do not separate the generated data from the main libraryTimothy Flynn
This CMakeLists.txt was basically copy-pasted from LibUnicode, where the generated data is separated into its own library. This was to let other libraries / applications decide if they actually want to link the data because it is so large. LibTimeZone's generated data is significantly smaller, so this separation really isn't needed.
2022-01-11Meta: Don't assume how each generator wants to generate keyed map namesTimothy Flynn
The generate_mapping helper generates a series of structs like: Array<SomeType, 1> s_mapping_key_0 {}; Array<SomeType, 2> s_mapping_key_1 {}; Array<SomeType, 3> s_mapping_key_2 {}; Array<Span<SomeType const>> s_mapping { { s_mapping_key_0.span(), s_mapping_key_1.span(), s_mapping_key_2.span(), } }; Where the names of the struct were generated by the format_mapping_name lambda inside the helper. Rather than this lambda making assumptions on how each generator wants to name its structs, add a parameter for the caller to provide a naming formatter. This is because the TimeZoneData generator will want pretty specific identifier formatting rules.
2022-01-11Meta: Support generating case-insensitive value-from-string methodsTimothy Flynn
This also extracts the default parameters for generate_value_from_string to a structure. This is just to make it cleaner to add new options.
2022-01-11AK: Define a traits helper for case-insensitive StringView hashingTimothy Flynn
Currently, we define a CaseInsensitiveStringTraits structure for String. Using this structure for StringView involves allocating a String from that view, and a second string to convert that intermediate string to lowercase. This defines CaseInsensitiveStringViewTraits (and the underlying helper case_insensitive_string_hash) to avoid allocations.
2022-01-11LibTimeZone: Remove accidental pluralization of generator variable namesTimothy Flynn
2022-01-11Meta: Convert new help page link styles for the man page websitekleines Filmröllchen
The special URL links (help://man) and the application opening links now work on the man page website. While the page links are translated correctly, the application launch can't be implemented. For this reason, an explanatory error page is shown instead.
2022-01-11Help+Base: Add help://man URLs for links between man pageskleines Filmröllchen
The URLs of the form `help://man/<section>/<page>` link to another help page inside the help application. All previous relative page links are replaced by this new form. This doesn't change any behavior but it looks much nicer :^) Note that man doesn't handle these new links, but the previous relative links didn't work either.
2022-01-11Help: Directly launch an app from its help pagekleines Filmröllchen
Through links in the help page, the user can directly launch the app whose help page is currently viewed. The idea for this feature came up in the discussion of #11557 (https://github.com/SerenityOS/serenity/pull/11557#issuecomment-1004830728 ). The intention is that the user can simply open the app they are currently trying to understand, and play around with it, learn by doing, or follow along with any guide that may be present in the help page. It feels very great :^)
2022-01-11Help: Refactor link handlingkleines Filmröllchen
Link handling is now split up between open_page and open_url. While open_page can handle any sort of input and is responsible for handling history UI, open_url deals in URLs and takes one of a few different actions depending on the exact URL given. Currently, only file:// URLs are handled but this will change in the next few commits. Note that this commit breaks relative URLs on purpose. After the new help:// URLs, they won't be needed anyways. The reasoning is that many URLs not specifically pointing to man page directories will cause a (non-deadly) unveil violation in `real_path_for`. This specifically concerns the new application launch URLs that are added in the next commit.
2022-01-11LibGUI: Make Tableview handle multi-selected indexes when deletingGlenford Williams
Previously when the delete key was pressed, only the first selected cell index would have been deleted. This commit remedies that by first checking when more than a single index is selected.
2022-01-11AK+LibC+LibPthread: Introduce NoAllocationGuardkleines Filmröllchen
NoAllocationGuard is an RAII stack guard that prevents allocations while it exists. This is done through a thread-local global flag which causes malloc to crash on a VERIFY if it is false. The guard allows for recursion. The intended use case for this class is in real-time audio code. In such code, allocations are really bad, and this is an easy way of dynamically enforcing the no-allocations rule while giving the user good feedback if it is violated. Before real-time audio code is executed, e.g. in LibDSP, a NoAllocationGuard is instantiated. This is not done with this commit, as currently some code in LibDSP may still incorrectly allocate in real- time situations. Other use cases for the Kernel have also been added, so this commit builds on the previous to add the support both in Userland and in the Kernel.
2022-01-11Kernel: Allow preventing kmalloc and kfreekleines Filmröllchen
For "destructive" disallowance of allocations throughout the system, Thread gains a member that controls whether allocations are currently allowed or not. kmalloc checks this member on both allocations and deallocations (with the exception of early boot) and panics the kernel if allocations are disabled. This will allow for critical sections that can't be allowed to allocate to fail-fast, making for easier debugging. PS: My first proper Kernel commit :^)
2022-01-10Ports: Remove wireguard-tools strsep() replacement patchLinus Groh
2022-01-10LibC: Implement strsep()Linus Groh
2022-01-10Ports: Update bash port to version 5.1.16Daniel Bertalan
The `remove-conflicting-declaration-in-glob` patch seems to not be needed anymore.
2022-01-10Ports: Add wireguard-toolsLinus Groh
What will it take to port WireGuard to SerenityOS? No idea. But this is a start :^)
2022-01-10Documentation: Add a method for 7zip and other archive toolskleines Filmröllchen
Some archive tools can open ext2 images like an archive, which is very convenient for people that already have such tools like 7zip. This also contains information for WSL users on where to find the _disk_image in Explorer.
2022-01-10Meta: Add Marcus Nilsson to the contributors list :^)Linus Groh
2022-01-10 Meta: Add Tim Schumacher to the contributors list :^)Linus Groh
2022-01-10Meta: Add Leon Albrecht to the contributors list :^)Linus Groh
2022-01-10Kernel: Fix indentation in CMakeLists.txtLinus Groh
2022-01-10Kernel: Remove redundant hash map of page tables in PageDirectoryAndreas Kling
The purpose of the PageDirectory::m_page_tables map was really just to act as ref-counting storage for PhysicalPage objects that were being used for the directory's page tables. However, this was basically redundant, since we can find the physical address of each page table from the page directory, and we can find the PhysicalPage object from MemoryManager::get_physical_page_entry(). So if we just manually ref() and unref() the pages when they go in and out of the directory, we no longer need PageDirectory::m_page_tables! Not only does this remove a bunch of kmalloc() traffic, it also solves a race condition that would occur when lazily adding a new page table to a directory: Previously, when MemoryManager::ensure_pte() would call HashMap::set() to insert the new page table into m_page_tables, if the HashMap had to grow its internal storage, it would call kmalloc(). If that kmalloc() would need to perform heap expansion, it would end up calling ensure_pte() again, which would clobber the page directory mapping used by the outer invocation of ensure_pte(). The net result of the above bug would be that any invocation of MemoryManager::ensure_pte() could erroneously return a pointer into a kernel page table instead of the correct one! This whole problem goes away when we remove the HashMap, as ensure_pte() no longer does anything that allocates from the heap.
2022-01-10Kernel: Don't relock MM lock for every page when remapping regionAndreas Kling
Make sure that callers already hold the MM lock, and we don't have to worry about reacquiring it every time.
2022-01-10Taskbar: Tweak taskbar button progress bar renderingAndreas Kling
The rects didn't take the "thin cap" button style into account, causing in-button progress bars to look a little off.
2022-01-10LibJS: Include hour-cycle in DateTimeFormat optionsTimothy Flynn
This is a normative change to the Intl spec: https://github.com/tc39/ecma402/commit/20e5c26 Note that this doesn't actually affect us. Its purpose is to provide the hour-cycle to BestFitFormatMatcher. This AO is implementation defined, and ours just invokes BasicFormatMatcher, which doesn't use this field. We could now have LibUnicode generate this field and use it to find a better format pattern, though.