All consumers of this API should be adjusted here.
This partially paves the way for use of committed pages for page tables.
Change-Id: Id6fc2edc86fbd80e929c413e23cf8de1509a8215
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8723
Reviewed-by: X512 X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
An extra argument is added to allow the VMAreaMappings objects to
be added to a queue instead of freed directly (and the lock unlocked,
and so on.)
All architectures adjusted.
This means there is now only one place in each TranslationMap that
the page state and other data is directly adjusted (in UnmapArea).
Change-Id: I3ed2d6d969d1b1e235144a1035c90c750779af27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8716
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Add some parentheses for clarity.
* Remove a comment about unreserving pages. In fact this method is
always called with pages already reserved, and in the path the comment
was in, we wouldn't want to unreserve anyway, because we've
successfully allocated.
* Use a boolean rather than an int for "useCached".
No functional change intended.
Besides the already set sound files, the Sounds popup menu shows
the files of all the B_*_SOUNDS_DIRECTORY.
As people/packages may sort sound themes in sub-folders there, only
add files from there to the menu, no folders.
Change-Id: I79cda5d547fc1a0ec0234384e3b76f2c455b2881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8722
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Default to B_SYSTEM_SOUNDS_DIRECTORY (if it doen't exist, the
home folder gets set automatically).
* Save the last used path in the Sounds_Settings file.
* If the last used path isn't valid any more, default to
B_SYSTEM_SOUNDS_DIRECTORY.
Change-Id: I90bf7e640e648e6e7dfc2941440550cb074c18f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8704
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
* HOST_CPU was getting set to "" on arm64 host builds of
Haiku which resulted in varying host tool directories
objects/linux/x86_64/release vs objects/linux/release
* This captures the changes in buildtools abcf50c2 which
adds proper arm 64, and riscv 32/64 OSPLAT definitions
Change-Id: Ife768fe3e4b1f90748b8f09afd632d4cd9c87d2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8720
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This cache is used for allocating typically ephemeral KPath buffers
for syscall handlers and the like. Letting it be drained to 0 by
the low resource system will just make future VFS syscalls needlessly
slower, so make sure that doesn't happen.
See inline comment: it's possible to race with other threads
and wind up with pages if there are a lot of waiters or lock
contention. Just bail out and retry in that case.
The only other potential way to fix this I can think of would be to add a
read-write locking strategy; however this would still be prone to races,
since we acquire and release the lock in a loop in reserve_pages,
and keep whatever pages we managed to reserve from the last iteration.
This way, we don't wind up in a situation where there are dozens of
waiters, each needing a handful of pages, but each also having a
handful of pages already reserved, and everything deadlocks.
Significantly improves system responsiveness under high memory usage.
There's still more to be done, however.
It doesn't make sense to reserve memory in other increments.
This would have caught #19295 earlier.
Also use PAGE_ALIGN in VMCache::SetMinimalCommitment.
Nothing uses it, and it isn't correct anyway: vm_page_num_free_pages()
now includes cached pages, too, while vm_available_memory() includes
not just available memory pages but also swap.
The documentation comment claimed this was done but it actually wasn't,
potentially leading to leaks of pages. However, this method appears
to be passed reservation objects only in one rare case in vm_soft_fault
at present. In brief testing, I didn't manage to get that case to
happen.
This method will be used in more cases in future refactors, so it's
important it work correctly.
Add IsRefFiltering() and IsFiltering() is once again either kind
of filtering: ref or type-ahead.
Use IsRefFiltering() in a few places, otherwise use IsFiltering()
to restore filtering code so that it gets triggered on either kind
of filter.
Make the filtering methods inline to avoid function call overhead.
Fixes #19317
Change-Id: I27407ca33e8f2b967975c8a8ef8de83105442bd4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8715
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Fixes missing / random colors when using Terminal as replicant and does not have side effects
Change-Id: I839098cf95298c729eac9f68c4d6de9308a47d39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8710
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The DefineBuildProfile logic implicitly removes it later on
when it replaces JAM_TARGETS entirely. But in some cases it
may not do that, and so if we want it to be removed in all cases,
we have to do that here.
Fixes commands like "jam -q -jN @nightly-anyboot haiku.hpkg"
giving a "don't know how to make @nightly-anyboot" message.
e.g. if one merely has "SetConfigVar DEBUG : HAIKU_TOP src system kernel ;"
this won't actually set a value for DEBUG, and thus it won't use one
of the pre-set debug objects directories, and so all the objects will
wind up in the root of wherever jam is run.
... also in Media and Mail servers.
Change-Id: I9a95dc289446ba0dbf138e29cbd6d0b75e6b5ddc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Make arrow and close button size font-sensitive.
Compose default window width based on font size.
Eliminate kCloseSize, kEdgePadding, kSmallPadding, kExpandSize
and kPenSize.
Eliminate NotificationView::_DrawCloseButton() in favor of calling
AppGroupView::DrawCloseButton().
AppGroupView::CloseButtonSize() method used in NotificationView.
Eliminate IconSize() from window and view parameter, get icon (and size)
from notification in the view.
Only move text down a line if title is set.
Change-Id: I53654c117bee634d3d8bddf6bf766577bd55b9a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8706
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... for example "2 selected" instead of "multiple selections".
Set minimum volume menu field width to "99 selected".
Refactor ShowVolumeMenuLabel() to have multiple selections once.
Change-Id: I5a2126972d3b93e7dd98ca631606302a59546f53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8151
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* linux + BSD accept 0.0.0.0 or :: as the default route identifier
* openvpn passes 0.0.0.0 as the default route
* our own route command shows "0.0.0.0" for the default route
Lets not be special here, and do what everyone else does. default
still works for backwards compat.
This uncovered a potental bug in BNetworkAddress. See #19296
Change-Id: I3aea99cae4cf9c52142cb97e2a06b8432de294b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8592
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alexander von Gluck <alex@terarocket.io>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
This should fix the colors in the dark mode, and will also properly size the scrollbar
The initial window is still quite small however, and skips deskbar.
Change-Id: I9181095cd44cc2b24cddcbd96754fb04a7ac2cfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7882
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
FontSelectionView was not getting added to the view hierarchy and
thus was not receiving the B_COLORS_UPDATED message when the colors
changed. This was because we wanted to build the grid all at once.
Instead build the grid inside each of the FontSelectionView's and
set the first column to the longest string afterwords so everything
lines up.
This updates the text view colors when the font changes. The rest
of the changes are to fix the view hierarchy so that we don't need
to explicitly call MessageReceived() on the FontSelectionView to
get receive B_COLORS_UPDATED.
Change-Id: Ice6ff0b8a95d522c9994b6b873fac10cf5f71ea4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8246
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The synaptics specification changes the meaning of the system bit when
there is incoming data from the AUX (mouse) port, to indicate that the
incoming byte is an error. This also allows to detect if the active
multiplexing is not enabled correctly or has been reset.
Use this as an additional check so that active multiplexing is disabled
on my laptop, where it doesn't work.
Keeps #19266 fixed while avoiding the long timeout on my machine.
Change-Id: Ia8277e135a149cfa25a2a3022c87c3e05aacb6d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8632
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
If the completion was just notified by another thread, it's possible
we were awoken and are trying to free this CCB before the other thread
released the condition variable's lock. So, call NotifyAll again
to serialize.
Should fix #17522.