This PR implements the standard behavior of displaying the mailbox name
and parenthesized unseen message count in bold when the unseen message
count is greater than zero.
- Use TRY_OR_FAIL() instead of MUST() in a few places
- Use for-each loop in two tests
- Use StringView literals instead of u8 arrays in a few places
No behavior change.
This fixes cases where fuzzy matching would return a better score for
a different pattern than a needle perfectly matching the haystack.
As an example, when searching for "fire" in emojis, "Fire Engine" would
have scored 168, while "Fire" was giving only 160.
This patch makes the latter have the best possible score.
Some callers of this API needlessly provide very large output buffer
even when input is small. Since we throw away all authentication-related
information here anyway, let's make the buffer (that gets
authenticated!) as small as possible.
Using sysretq clobbers rcx and r11 as this instruction loads the rip and
rflags from those registers. This is fine for normal syscalls.
Signal dispatching works like this:
The kernel makes userspace jump to the signal trampoline when a signal
is dispatched. That trampoline then executes the sigreturn syscall after
calling the signal handler to continue executing the code before the
signal was dispatched.
Since e71c320154 the sigreturn syscall is done via the syscall
instruction (and int 0x82 support was removed in the next commit),
which causes the kernel to currently use sysretq to return to userspace.
But signals can happen at any time, not just during syscalls, so the
sigreturn syscall shouldn't clobber the contents of those registers when
returning to userspace.
This allows us to properly limit our block requests to the device's
capabilities, and choose more optimal block counts for I/O operations.
In theory, as Qemu only advertises a block limit above our current
internal block size limit of u16::max and does not advertise any optimal
transfer lengths.
This is apparently what bootloaders do before using a USB storage device
so we should likely do so as well, especially when no BIOS is present,
like on riscv.
Co-Authored-By: Sönke Holz <sholz8530@gmail.com>
Instead calculate the load offset at runtime.
The mapping of the initial stack is now done explicitly. It was
previously included in the 2 MiB-aligned kernel range.
We need to use kernel8.img now, as we no longer hard-code the physical
addresses of all sections in the linker script. QEMU would otherwise
try to load us at KERNEL_MAPPING_BASE.
This is slightly better than assuming that cutting off the high 32 bits
results in the physical address. This worked for now because the kernel
(and stack) is mapped at KERNEL_MAPPING_BASE + PHYSICAL_LOAD_ADDR and
KERNEL_MAPPING_BASE & 0xffff'ffff == 0.
The next commit will move the kernel to KERNEL_MAPPINGS_BASE + 0, so
we need to get the physical address in a slightly less hacky way.
59aaef08d9 LibMedia: Rename LibVideo to LibMedia
aa2f5df0a9 AK: Add a helper to detect which CPU features are supported
0bbf42bca7 LibJS: Introduce the CanonicalizeKeyedCollectionKey AO
e06d74c314 LibWeb: Give DOM Elements a CountersSet
07fe3e57c6 LibWeb: Implement CounterStyleValue
1bc896fa60 LibWeb: Implement counter-[increment,reset,set] properties
78a22f5098 LibWeb: Replace templated retarget function with a regul...
e4fa0e7f63 LibWeb: Implement fetch record from the fetch spec
a8c4f34bff LibWeb: Create separate DedicatedWorkerGlobalScope class
Also add Services to include_dirs for LibWeb. This is necessary
due to the <WebWorker/DedicatedWorkerHost.h> include added in #24870.
They do happen in practice.
We might have to do more to do actual color conversions with
these profiles, but for now let's at least load them.
Fixes rendering of a few images in my thesis in LibPDF.
The images were created in OmniGraffle in 2008, then saved as
PDF, then converted to eps using LaTeX tooling.
From my previous interactions with the Serenity community, it was clear
to me that this rule (for better or worse) was introduced by the author
that wanted to focus on the code and not let an open-source operating
system project be used as a 'political vehicle' and so as to not have
to possess a political science degree to operate the project thought to
be a technical exercise, like building a sandcastle.
For better or worse.
Unfortunately, the wording as-is can be interpreted as a dogwhistle
in the direction of "keep politics out of tech", which has been present
in communities like, as of recently, NixOS - and this seems to have
caused the problems that Serenity has been intentionally trying to
avoid.
It might also disregard cases of technical arguments, arguments
involving how people treat each other _within_ the community as well
as how to change the wording in documentation with the sole intent of
making the project more attractive to more contributors.
Given recent commits and governance changes, I decided to rewrite the
rule to make it more clear and encourage people to be "more excellent
to each other", while not compromising on what I see as the original
meaning.
We were computing abs(sum(signed_pixels)), while the comment says
that sum(abs(signed_pixels)) works well. Change the code to match
the comment. (While I did tweak this code recently, as far as I can
tell the code hasn't matched the comment from when it was originally
added.)
Using the benchmarking script and same inputs as in #24819, just changed
to write .png files with different --png-compression-level values:
level 0: 390M -> 390M (no change)
level 1: 83M -> 78M (6% smaller)
level 2: 73M -> 69M (5.8% smaller at default compression level)
level 3: 71M -> 67M (5.6% smaller)
Sizes as computed by `du -hAs`. (`-A` prints apparent size on macOS.
It's important to use that flag to get consistent results. On Linux,
this flag is spelled `-b` instead.)
The size of sunset_retro.png goes up a tiny bit, but but less than
0.4% at all sizes. At level 2, the size goes from 908K to 911K, for
example.
The size of Tests/LibGfx/test-inputs/jpg/big_image.jpg encoded as PNG
goes down by about 2.7%, but it's the 2.7% that gets us over an MB
boundary at levels 1 and 2. At level 1, from 14M to 13M; at level 2
from 13M to 12M. (Exact numbers: 14417809 bytes to 13429605 at level 1,
14076443 bytes to 13088791 at level 2.) For comparison, sips writes a
15M (15610049 bytes) file. So we were already writing a smaller file,
and now we're even better. (We need 778 ms at level 1 while
sips needs 723ms. So it's a bit faster, but not a ton.)
The size of wow.apng goes from 606K to 584K (3.6% smaller).
Perf-wise, this is close to a wash. Worst case, it's maybe 2-3% slower,
but the numbers are pretty noisy, even with many repetitions in
`hyperfine`. I'm guessing `ministat` would claim that no significant
difference can be shown, but I haven't tried it. For example, for
sunset_retro.png at level 2, time goes from 179.3 ms ± 2.5 ms to
182.8 ms ± 1.9 ms, which would be a 2% slowdown. At level 0, where
the effect is relatively largest, it goes from 21.8 ms ± 0.7 ms to
22.6 ms ± 0.7 ms, a 3.6% slowdown (but with huge error bars).
For big_image.jpg level 1, time goes from 768.5 ms ± 8.4 ms to
777.9 ms ± 6.0 ms, 1.2% slower.
Previously, we were swapping red and blue before doing filtering.
The filters don't care about channel order, so instead only do
this when writing the PNG data.
In theory, this saves the work of channel swizzling when figuring
out which filter is best. In practice, it's perf-neutral:
swizzling is basically free. But it's still conceptually simpler.
No behavior change.
This makes Processor::capture_stack_trace() work on all our
architectures. For this function to work on AArch64 and RISC-V, the
frame pointer has to be saved during context switches.
AArch64 and RISC-V don't support SMP yet, so the code for getting a
backtrace for processes running on other cores is guarded behind a
'#if ARCH(X86_64)'.
This function was only used to verify that we are running in kernel
mode. But it is pretty much impossible that we will ever end up in
kernel code and actually are able to execute it in user mode. A lot of
stuff must go completely wrong to end up in such a situation.
Getting the current privilege level is also impossible on RISC-V by
design.