Commit Graph

32498 Commits

Author SHA1 Message Date
Linus Groh
d099527dbb Ports: Add wireguard-tools
What will it take to port WireGuard to SerenityOS? No idea. But this is
a start :^)
2022-01-10 21:22:41 +01:00
kleines Filmröllchen
60ace37713 Documentation: Add a method for 7zip and other archive tools
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-10 21:18:07 +01:00
Linus Groh
7204861e8f Meta: Add Marcus Nilsson to the contributors list :^) 2022-01-10 19:13:05 +01:00
Linus Groh
f2e8026f00 Meta: Add Tim Schumacher to the contributors list :^) 2022-01-10 19:12:17 +01:00
Linus Groh
1b73c7af5f Meta: Add Leon Albrecht to the contributors list :^) 2022-01-10 19:10:50 +01:00
Linus Groh
49471b63f8 Kernel: Fix indentation in CMakeLists.txt 2022-01-10 19:10:02 +01:00
Andreas Kling
24ecf1d021 Kernel: Remove redundant hash map of page tables in PageDirectory
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-10 16:22:37 +01:00
Andreas Kling
bdbff9df24 Kernel: Don't relock MM lock for every page when remapping region
Make sure that callers already hold the MM lock, and we don't have to
worry about reacquiring it every time.
2022-01-10 16:22:37 +01:00
Andreas Kling
d7475449cc Taskbar: Tweak taskbar button progress bar rendering
The rects didn't take the "thin cap" button style into account, causing
in-button progress bars to look a little off.
2022-01-10 16:22:37 +01:00
Timothy Flynn
05de9b82b8 LibJS: Include hour-cycle in DateTimeFormat options
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.
2022-01-10 16:18:05 +01:00
Timothy Flynn
15947aa1f0 LibUnicode: Add an hour-cycle field to DateTimeFormat's format pattern 2022-01-10 16:18:05 +01:00
Michel Hermier
e1685b6b69 Lagom: Avoid declaring Time in the global namespace
When compiled using clang, an ambiguity error is detected between
`class AK::Time` aliased to `::Time` and the `struct ::Time` provided
in `GenerateTimeZoneData.cpp`. Solve this by moving most of the code in
an anonymous namespace.
2022-01-10 15:57:59 +01:00
Marcus Nilsson
4459cb33ed LibGUI+AK: Add DRAG_DEBUG opt and put drag operations behind dbgln_if
No need to have this enabled all the time.
2022-01-10 14:23:04 +01:00
Brandon
f43b69f8e2 Documentation: Document how to transfer files from QEMU to the host
Document how to transfer files from QEMU to the host
2022-01-10 10:31:54 +01:00
Dylan Katz
79cdb5e3c8 2048: Add action icons for New Game and Settings 2022-01-10 00:58:40 -08:00
Dylan Katz
fe3bd062b7 2048: Simplify dialog box when target reached
Previously, upon reaching the target, the player is presented with
potentially two dialog boxes: one asking if the user wants to
continue endlessly and another showing the player's statistics,
which would only be shown if the user does not want to continue.

This commit consolidates these into a single dialog box that shows
the relevant statistics and asks the user if they want to continue
endlessly.
2022-01-10 00:58:40 -08:00
Dylan Katz
0fda98dfb3 2048: Fix off-by-1 when opening settings
When opening 2048's settings, it translates the target tile into
a power of 2. Previously, it was done incorrectly, causing the
resulting value to be off by one, and the number would increase
every time one opens, saves and closes the settings. With this
change, it now works as expected.
2022-01-10 00:58:40 -08:00
Hendiadyoin1
2b206b1854 Meta: Disable readability-use-anyofallof clang-tidy check 2022-01-09 23:29:57 -08:00
Hendiadyoin1
1cdace7898 Kernel: Add implied auto qualifiers in Memory 2022-01-09 23:29:57 -08:00
electrikmilk
ae8c7eebbd Base: Add Hebrew Characters 2022-01-09 22:33:27 -08:00
Daniel Bertalan
162606f358 Toolchain+CI: Link LLVM with LLD if available
According to most benchmarks, LLD is faster than GNU ld and the macOS
linker, so let's use it if possible in order to speed up the toolchain
build.
2022-01-10 09:55:45 +03:30
Daniel Bertalan
d21c38a72d CI: Hash only relevant files for the key of the compiler cache
In the last few commits, a second patch was added to the LLVM toolchain,
and it no longer uses our binutils patch. This commit changes the CI
cache keys accordingly, in order to prevent unnecessary rebuilds of both
toolchains when only one is changed.

The Clang toolchain's cache now only takes into account patches that
begin with `llvm`, and the GNU toolchain excludes those from the hash
calculation. We now also hash the two CMake cache files that we use for
building LLVM and its runtime libraries.
2022-01-10 09:55:45 +03:30
Daniel Bertalan
43008267b2 Toolchain: Do not overwrite libraries with stubs when rebuilding LLVM
We erroneously appended ".so" after the base name for the library,
so we ended up checking for the existence of e.g. `libc.so.so`,
which obviously didn't exist, so we overwrote the existing libraries
when we rebuilt the toolchain.
2022-01-10 09:55:45 +03:30
Daniel Bertalan
b3dbf204fc Toolchain: Don't use GNU objcopy in the LLVM toolchain
Our build of LLVM's objcopy now supports the single missing feature
(--update-section) that previously forced us to use the one from GNU
Binutils. This means that there is no reason anymore to build Binutils
alongside LLVM's tools.
2022-01-10 09:55:45 +03:30
Daniel Bertalan
b19cc3cdcb Toolchain: Backport --update-section support to llvm-objcopy
This commit backports the LLVM commit that adds support for the
`--update-section` flag to llvm-objcopy. We use this feature of GNU
objcopy to embed the symbol map in the kernel.

The corresponding LLVM Phabricator Differential Revision can be found
here: https://reviews.llvm.org/D112116

This patch is identical to the upstream commit, except for two hunks
that had to be changed as they didn't apply cleanly.
2022-01-10 09:55:45 +03:30
Rafał Babiarz
3132ce1d36 LibGUI: Show hours and minutes in "unsaved changes" dialogs 2022-01-09 20:25:48 -08:00
Rafał Babiarz
0012c03eb5 AK: Added human_readable_time() method for "unsaved changes" dialogs 2022-01-09 20:25:48 -08:00
Pankaj Raghav
9ae2285675 Kernel: Make enumerate_disk_partitions function not const
The enumerate_disk_partitions function doesn't need to be const. Remove
the constness and use the newly added `add_partition` function.
2022-01-09 20:18:37 -08:00
Pankaj Raghav
2c810332b6 Kernel: Add add_partition function
Until now partitions were added directly by accessing the private member
of the StorageDevice class.

Add a new member function to add partition.
2022-01-09 20:18:37 -08:00
electrikmilk
794e82016e Base: Complete Greek & Coptic, and Cyrillic
Add the rest of the Greek & Coptic, and Cyrillic characters.
2022-01-09 19:17:19 -08:00
electrikmilk
faef6cc82c Base: Fix non fixed-width in Cathode
Fix letters that aren't fixed-width (i, I, l)
2022-01-10 00:32:37 +01:00
Andrew Kaster
da00ccb26a Ports: Add "-ldl" as CMAKE_DL_LIBS in CMake platform patch 2022-01-09 23:32:03 +01:00
Andrew Kaster
d8110e3bac Ports: Add ccache port to make compiling on Serenity more fun :^) 2022-01-09 23:32:03 +01:00
Andrew Kaster
12c352dfc9 Ports: Convert curl port to use CMake, remove two autoconf patches
This removes the shlib hack from the install step, which repackaged the
static library as the shared one. It also has the benefit of making the
port work with the Clang toolchain :^).
2022-01-09 23:32:03 +01:00
electrikmilk
64c546b909 Base: Monospace font
Add default monospace style font for code editing.
2022-01-09 14:23:14 -08:00
Jelle Raaijmakers
1d627f1b2c Ports: Patch out SDL timer lock from ScummVM
This change is backported from upstream master and prevents unnecessary
spam to our debug console about NULL mutexes.
2022-01-09 23:23:01 +01:00
Jelle Raaijmakers
3ce1118af1 Ports: Compile ScummVM with OpenGL support
By default, ScummVM will still run in software rendering mode, but the
options to enable OpenGL will become available.
2022-01-09 23:23:01 +01:00
Jelle Raaijmakers
57b1dcbec9 LibGL: Add stub for glColorMaterial 2022-01-09 23:23:01 +01:00
Jelle Raaijmakers
6e64ad829a Ports: Update ScummVM to version 2.5.1 2022-01-09 23:23:01 +01:00
Jelle Raaijmakers
7ad18e91e2 LibGL: Add capabilities to context parameters
Context parameters are LibGL's way of centrally defining all parameters
that can be retrieved through `glGetBoolean*`, `glGetInteger*`, etc.
The spec describes that capabilities such as `GL_LIGHTING` can also be
retrieved through these methods, but it should not be possible to
retrieve random boolean parameters through `glIsEnabled`. For example,
`GL_UNPACK_LSB_FIRST` can only be retrieved through `glGet*`.

This moves reading of capabilities to `::get_context_parameter` and
implements its use in `::gl_is_enabled`.
2022-01-09 23:21:03 +01:00
Linus Groh
09a11fa6ea LibJS: Implement proper Iterator records
Instead of using plain objects as Iterator records, causes confusion
about the object itself actually being its [[Iterator]] slot, and
requires non-standard type conversion shenanigans fpr the [[NextValue]]
and [[Done]] internal slots,  implement a proper Iterator record struct
and use it throughout.

Also annotate the remaining Iterator AOs with spec comments while we're
here.
2022-01-09 22:02:43 +01:00
Linus Groh
e141f1e976 LibJS: Use Optional<Value> for potentially missing value in Iterator AOs
Given we're already moving away from using the empty Value elsewhere,
and I'm about to update most of this code, let's do this small tweak
now.
2022-01-09 22:02:43 +01:00
Stephan Unverwerth
f9c5c120f6 AK/SIMD: Suppress psabi warnings and add explanatory comment 2022-01-09 21:03:08 +01:00
Daniel Bertalan
4a428ba252 Meta: Do not allow undefined symbols in executables and shared objects
The `--allow-shlib-undefined` option is a bit of a misnomer. It actually
controls whether we should be allowed to have undefined references after
symbols from all dependencies have been resolved, so it applies both to
shared libraries and executables.

LLD defaults to allowing undefined references in shared libraries, but
not in executables. Previously, we had to disable this check for
executables too, as it caused a build failure due to the
LibC-LibPthread-libc++ and the LibCore-LibCrypto circular dependencies.

Now that those have been resolved, we can enable this warning, in the
hopes that it will prevent us from introducing circular libraries and
missing dependencies that might cause unexpected breakage.
2022-01-09 20:40:22 +01:00
Daniel Bertalan
e1eefe2b52 LibCrypto: Link against LibCore
The ASN1 parser calls `LibCore::DateTime::create` and
`LibCore::DateTime::now`.
2022-01-09 20:40:22 +01:00
Glenford Williams
f5ff011c1b Spreadsheet: Properly pass parent window to Workbook
Change the parent of the WizardDialog to that of the Spreadsheet window.
Previously the WizardDialog was using the open file dialog as the
parent resulting in the csv import dialog
2022-01-09 20:38:55 +01:00
Marcus Nilsson
876424923a PixelPaint: Verify that we have an ImageEditor instead of returning
We should never be in a state where an action requiring an ImageEditor
is enabled if all tabs are closed.
2022-01-09 20:24:02 +01:00
Marcus Nilsson
ae958d97b2 PixelPaint: Disable actions when no ImageEditor is open
Disable all actions when the last tab is closed and enable them when a
new ImageEditor is created.
2022-01-09 20:24:02 +01:00
Marcus Nilsson
708ec90bba LibGUI: Add Menu::set_children_actions_enabled() helper
This adds a helper function to Menu that allows us to set all the
children enabled/disabled.
2022-01-09 20:24:02 +01:00
Marcus Nilsson
18e6da6d4d PixelPaint: Keep a RefPtr to layer in LayerPropertiesWidget
Using a WeakPtr to keep a reference to the active layer caused it to
be destroyed when the last tab was closed, which made the
m_layer == layer check in set_layer() return early since it was
already null. Because of this the LayerPropertiesWidget was never
disabled.
2022-01-09 20:24:02 +01:00