Commit Graph
67653 Commits
Author SHA1 Message Date
Jérôme Duval 34c270d993 RosterPrivate: add missing parameters in documentation
Change-Id: I7e9ba8fa07eaf95717a31f51273653340864e731
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9126
Reviewed-by: waddlesplash <[email protected]>
2025-03-15 18:33:16 +00:00
Jérôme Duval 3bb7234bcb launch_daemon: job is launching when condition is met
fix Tracker and Deskbar not starting on first boot

Change-Id: I7e1f8009ccb1e620549952d9372a0532e80a633b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9125
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-15 13:20:44 +00:00
Augustin Cavalier 3d0e9319f6 libroot/glibc: Put wctype_t declaration inside second guard.
Should fix the build on GCC2.
2025-03-15 09:20:15 -04:00
Humdinger e2878192d8 Updated credits of AboutSystem
Added translators we've missed before. Thanks everyone!
* 玉堂白鹤 for Simmplified Chinese
* Путий Иван (itvanya) for Russian

Change-Id: I7f1bc2b85554711b894367dc92b02a04b8426f23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9124
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-15 13:04:41 +00:00
Augustin Cavalier d95c04c2ee libroot/glibc: Remove some more unused files. 2025-03-15 08:11:49 -04:00
Augustin Cavalier 77dc532e76 libroot: Drop unused/uneeded empty tls.cpp. 2025-03-15 07:52:09 -04:00
Autocomitter 317f10be3f Update translations from Pootle 2025-03-15 08:08:53 +00:00
Andrew Lindesay 05ff00f04c HaikuDepot: Refactor for general performance
This commit is a large "big bang" commit of a composite of changes
that would have been challenging to put in place over a PR train.
The changes yield a significant performance improvement in general
but also lay the foundation for being able to make further smaller
gains over time. The changes should also improve stability of the
application. This commit is a high-risk change and would ideally
be coupled with testing.

The key things which have changed in this commit;

- Code reformatting has been applied at the same time.
- Data models are now largely immutable with builder-style
  constructors.
  - The code base was previously handling locking of data obtained
    from the central model manually in many places which was
    prone to mistakes. Now accessing data is, from the clients'
    perspective, largely lock-free.
  - The removal of locks now removes lock-contention in various
    areas of the application including startup which helps with
    improving performance.
  - Repositories of data such as categories and languages are
    now also immutable.
- To simplify data immutability, packages' data is stored in the
  central model separately from depots' data.
- Large package data mutations are now done in chunks of packages
  rather than package-by-package which means reduced messaging
  within the application; especially around the GUI.
- The resolution of data / mutations' notifications is larger
  so that changes are not being considered on each property of
  a package which simplifies the processing logic in a number of
  places.
- Package change-notification is driven out of the central model
  rather than from each and every package. There is scope for
  further simplification in this space.
- Where logic already knows what data is changed, it is able to
  control the change-notification process rather than cause a
  large number of object-comparisons to be required.
- The data-loaders from the local package manager and from HDS
  have been re-written to work with immutable models.
- The icon repositories have been re-written to make a one-time
  notification that icons have changed rather than notify for
  every package.
- Data updates reflection in the UI has been changed to work in
  chunks of packages rather than package by package which
  reduces the quantity of UI window-invalidation / redraws and
  also reduces the quantity of re-calculation of scrollbars and
  other UI elements.
- Some UI elements have their metrics calculated lazily rather
  than up-front which yields a significant performance gain.

Change-Id: Iefaf4a137411e379e4c461ebc8c783fd1646bcf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9093
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Andrew Lindesay <[email protected]>
2025-03-15 06:56:32 +00:00
Augustin Cavalier 20a6449385 kernel: Add thread setting to prevent page waits and use it in the file cache.
See inline comment: otherwise we could deadlock waiting for busy pages.

At the same time, make page_faults_allowed just an int16 and drop
atomics and extra checks, they aren't needed.

Fixes #19441.

Change-Id: I1b7cc06f66b44c3520fa36497c076ee5a6320706
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9120
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-14 18:34:06 +00:00
Jérôme Duval bf0c6bfb90 libnetwork: freeifaddrs() deletes with the right type
to silence libasan on libnetwork

Change-Id: I0a2c35569fe2092d047c830d40763317eb1c4d1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9123
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-03-14 18:30:13 +00:00
Augustin Cavalier c97ebaf1c7 MediaPlayer: Improvements to time tooltip.
* Make PositionToolTip update even when not attached to a window.

 * Always use the "hover" message to update the tooltip,
   never SetPosition.

 * Use BControl::Invoke so that hover messages are sent instantly.

 * Position the tooltip above the slider always.

Combined with the fixes to the Interface Kit, this provides a much
nicer experience for slider time tooltips.


Change-Id: Ib7f884ca91c253ed7e6639946fd2378166137d80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9122
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-14 17:50:43 +00:00
Akash Kumar 1725765ef7 MediaPlayer SeekSlider: show playing time corresponding to mouse position
Fixes #8567.

Change-Id: I03f06f1ac5014d718919280686970a3dbd6ae7dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8997
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-14 17:50:43 +00:00
Augustin Cavalier acb9747e38 Interface Kit: Don't hide tooltip if we don't have any.
Ideally we would only hide our own tooltip and nobody else's, so
a TODO is added for that case.

This method is called for all mouse events if we get B_OUTSIDE_VIEW
or B_EXITED_VIEW as their "transit", but since tooltips themselves
get all mouse events and thus B_OUTSIDE_VIEW, this had the effect
of hiding all tooltips immediately instead of after the delay.
2025-03-14 13:47:54 -04:00
Augustin Cavalier d3009c305c Interface Kit: Always use the specified "where" in ShowTip.
It was previously ignored if the tooltip was already open.

Note that, combined with the previous commit, this means that
the "where" passed in will basically always be used (except for
"sticky" tooltips.) Applications or classes that use this private
API but pass in wrong or bogus positions will now need to be fixed.
2025-03-14 13:46:58 -04:00
Augustin Cavalier 6ac738b4de Interface Kit: Reset tooltip frames to their previous "where" on resize.
Instead of re-fetching the mouse position. This avoids tooltips "jumping"
when they may have resized by only a few pixels and don't need to be
repositioned.
2025-03-14 13:46:46 -04:00
Augustin Cavalier 30e5362d88 kernel/lib: Drop mergesort.
Nothing seems to use it.
2025-03-13 23:03:36 -04:00
Augustin Cavalier 546041c0ee libroot: Adjust stubs generator to work on Python 3. 2025-03-13 21:18:15 -04:00
Augustin Cavalier c23f4fec07 libroot/glibc: Update getopt to glibc 2.41.
Minor adaptations to integrate properly with Haiku libc.
2025-03-13 21:17:54 -04:00
Augustin Cavalier bbd93d522e libroot/glibc: Remove some unneeded files.
We can just use the system versions of these, or in the lc-
cases they didn't actually define any symbols.
2025-03-13 20:44:46 -04:00
Augustin Cavalier b989960b81 libroot/stdlib: Reinstate mistakenly removed UsePrivateHeaders. 2025-03-13 19:39:29 -04:00
Augustin Cavalier 705f9c114d libroot/stdlib: Define _DEFAULT_SOURCE for newer GCC.
So that we don't get warnings/errors about missing prototypes
for the non-standard sort functions.
2025-03-13 19:38:18 -04:00
Augustin Cavalier 95eee47cdc libroot/stdlib: Add qsort_r.
It's in POSIX-2024. Remove the libgnu implementation and just import
the changes from latest FreeBSD (dc36d6f9bb1753f3) instead.

While at it, put the non-standard sort functions behind
_DEFAULT_SOURCE.
2025-03-13 19:30:39 -04:00
Augustin Cavalier 194f7cff83 legacy stdc++: Delete all unused protected streambuf APIs that use IO_FILE directly.
Unfortunately there are some marked "public" that also use it,
so we can't just move the remainder to an internal file and then
drop libio.h from public consumption.

Delete all the unused portions of the public libio.h while at it.
2025-03-13 18:22:33 -04:00
Augustin Cavalier aa3a5e7698 headers: Drop _G_config.h from public headers.
Adjust the two legacy stdc++ headers that still included it;
it seems they didn't themselves depend on any of the definitions it
contained. However, streambuf.h actually did, so put that definition in
libio.h so that it's always present.

(The stdc++ implementation will get the 'real' _G_config.h from
libroot glibc.)
2025-03-13 17:23:44 -04:00
Augustin Cavalier 1799deddfd legacy stdc++: Drop <iostdio.h>.
It couldn't have been used anywhere, because "iolibio.h" is
available only in glibc includes in libroot, not in the
"headers" directories.
2025-03-13 16:36:09 -04:00
Augustin Cavalier 01a481d470 legacy stdc++: Make sure MTSAFE_IO is always enabled.
It's set in _G_config.h, but this file doesn't include that,
so in many cases the "unlocked" function was called instead.
(Most of the stdc++ .cc files did have it set, though.)
2025-03-13 16:35:23 -04:00
Augustin Cavalier 3b587ea361 legacy stdc++: Drop standard methods that are implemented in libroot.
sigsetmask is in libbsd.so, so keep the version here. All others
can just be dropped as the libroot implementations should suffice.
2025-03-13 16:16:54 -04:00
Augustin Cavalier 9769edfa33 headers: Get glibc <libio.h> out of the default include path.
It's needed by GCC2 stdc++, but we shouldn't be including it
for all consumers of <stdio.h>, which we were. Drop it,
and adjust all the things that were relying on <stdio_pre.h>'s
definition of __PRINTFLIKE to use the _PRINTFLIKE defined
in BeBuild.h instead.

Hopefully should not cause any breakage; the libroot
implementation of __freading depended on this, but
I didn't see anything else which did.
2025-03-13 15:57:25 -04:00
Augustin Cavalier 80f7969714 kernel/x86_64: Correct address mask in DebugGetReverseMappingInfo.
With how we currently use virtual address spaces, the old and
new computations should produce identical results even on LA57,
but this should be more correct if we ever do use more than just
48 bits of the address space.

Change-Id: I61915fceff8e7998032e0a9895010ef9c26b7b94
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9121
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-13 12:55:59 +00:00
Augustin Cavalier d68fa86ee1 libroot/unistd: dup3 should return EINVAL if oldFD == newFD.
As per POSIX-2024.

Fixes #19476.
2025-03-12 22:01:57 -04:00
Augustin Cavalier 0d73795fc9 libroot/malloc: Make the guarded heap handle bogus pointers better.
* Check if the area is a stack, and panic() if so.

 * Check names before accessing any area, and don't try
   to do anything with areas that we didn't create.

Makes frees pointing to stack data have much more useful
diagnostics than just "generic segfault".
2025-03-12 18:37:40 -04:00
Augustin Cavalier 3d196bd28c kernel/x86_64: Handle LA57 paging in VMTranslationMap page table walks.
Without this, we will fail to free the last level of page tables.
This bug has apparently been present since LA57 was originally
introduced years ago, however it was likely not a problem before
now because only the BIOS bootloader has support for it, while
systems that support LA57 are more likely to be booted via EFI.

While at it, fix the address mask for non-LA57 in
DebugGetReverseMappingInfo.

Should fix #19460.
2025-03-12 12:56:01 -04:00
Augustin Cavalier 92e002641e kernel/x86_64: Clear the lower half of the kernel PML4 in LA57 mode.
It also has an identity mapping that needs to be removed,
same as the PML5.
2025-03-12 12:20:27 -04:00
Augustin Cavalier ed8ca68825 ProcessController: Use more BString::SetToFormat. 2025-03-12 08:31:19 -04:00
Augustin Cavalier 139c35c9b9 ProcessController: Fix return type of UpdateSituation.
fWriteMemory is an int64.
2025-03-12 08:30:22 -04:00
Augustin Cavalier 282c3b6e08 kernel/slab: Set write protection on MemoryManager areas.
The MemoryManager maps and unmaps pages manually, so this isn't
strictly necessary, but it helps with memory accounting in e.g.
ProcessController.

Fixes the kernel_team disappearing from ProcessController's list
(and also having too-low memory amounts) as noticed in #19460.
2025-03-12 08:28:29 -04:00
Augustin Cavalier 70c25855f4 kernel: Move convertutf to utils.
No functional change.
2025-03-12 08:26:19 -04:00
Augustin Cavalier a97c4affc9 kernel: Rename basic "int" functions to "interrupt" (or at least "intr").
"int" of course is also an abbrevation for "integer", so having
two abbreviations is sometimes confusing. The BeOS functions
just use "interrupt" (e.g. "install_io_interrupt_handler"); it
seems we inherited the "int" abbreviation from NewOS.

The basic kernel methods and files related to interrupts are
here adjusted to drop the abbreviation and just use "interrupt(s)".
The architecture-specific functions ("arch_int_*") are mostly
moment left alone for now, though of course architecture-specific
usages of the generic kernel methods are adjusted.

Change-Id: Ic113ea1280a3c78e25f8ca3cc55b24ed5f594eae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9119
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-12 01:58:33 +00:00
Augustin Cavalier ed5c4d8a2d file_systems: Add O_DIRECTORY checks to many filesystems that were missing them.
This doesn't get all the filesystems that were missing these checks
(e.g. I didn't adjust the more "WIP" filesystems like XFS and BTRFS)
but it does get most of them.
2025-03-10 23:30:07 -04:00
Augustin Cavalier 992f1401b2 ProcessController: Report kernel memory and fix some TODOs.
* Restore logic for excluding app_server side of bitmaps
   (though this may not work for server-cloned areas, only
   server-allocated ones.)

 * Leave TODO in place for media buffers.

 * Add all kernel-writable areas of the system (kernel) team
   to writable memory, but exclude the block_cache.

Fixes display of kernel memory information in ProcessController's
memory usage menu.
2025-03-10 22:35:55 -04:00
Augustin Cavalier e2ffc7fd31 kernel/vm: Don't report kernel protection to userland except for root.
And don't report other UIDs' area informations at all.

Fixes a TODO.
2025-03-10 22:34:17 -04:00
Augustin Cavalier e87593ae21 atheros813x: Merge changes from upstream FreeBSD.
Up through upstream commit 05a95d19cb248203acdd4e069d3eedfe597c3b49.

May fix #19471.
2025-03-10 22:27:53 -04:00
Jérôme Duval 52c25f31c7 launch_daemon: setting condition also checks for driver_settings
only checks for a field, or field = value

Change-Id: I5dfadb6187831a51e97064cdfed55430b74f7b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9117
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-11 02:15:39 +00:00
Jérôme Duval 778fe0b67b driver_settings: bufferSize being zero means buffer overflow
Change-Id: I87b4a57c651840ac6aa01d602eddabb192c8c323
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9116
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-11 02:15:39 +00:00
Jérôme Duval 63792e3fd0 Revert "driver_settings: Replace type of bufferSize from size_t to ssize_t"
This reverts commit d2a423e499.

this matches the method found in driver_settings.h

Change-Id: Idb1a83dd648d18916ee2ec34727c88fb8f25cb3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9095
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-11 02:15:39 +00:00
Jérôme Duval 7f7d085c59 launch_daemon: implement file_created event
Change-Id: Ie42abe85c594be3c354e2d1b5bb25b881a7adea4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9089
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-11 02:15:39 +00:00
Jérôme Duval e4e3f81a1b launch_daemon: failed condition now skips the job
Change-Id: I0d3db96a068ecc40dfd1c501dfae5800c0e28116
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9080
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-11 02:15:39 +00:00
Augustin Cavalier ea0c6448f2 kernel/x86_64: Reset FPU state in x86_64_thread_entry.
Otherwise it won't be reset at all and we will begin with the
previous thread's FPU state, both for userland and kernel threads.

Also clear the FPU state in x86_return_to_userland, just like
in syscall exit.

Change-Id: Ie46d0e64a680c860c7fbff8dc57116625724eadd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9092
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-03-11 02:13:26 +00:00
Augustin Cavalier 317307ff46 headers/x86[_64]: Name the "mxcsr_mask" fields properly.
These values aren't referenced anywhere at present however.

Change-Id: I870d6321c6d30f850f48f811213124276543a1a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9091
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-03-11 02:13:26 +00:00
Augustin Cavalier 6db4b42346 kernel/x86_64: Store FPU state from int_bottom_user in arch_thread always.
The XSAVE area can be quite large (1-2KB+), so rather than always
putting it on the kernel stack, just use the arch_thread FPU state.

Change-Id: Ie64c3ea3ca52cd8a4425ae1da69792588a69832a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9090
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-03-11 02:13:26 +00:00