This header gets included in the build platform, so we can't use
the private recursive_lock.
Eliminates another statically created BLocker, due to gDefaultTokens.
This is not an expected failure condition for most applications,
so try to avoid propagating it to userspace.
(If necessary, it should be possible to avoid even the possibility
of this by just allocating necessary datastructures upfront
instead of "lazily". But that seems unnecessary at the moment.)
The lighter "struct mutex" is in a private header, so we can't
inline it in a public one, so just use pthread_mutex here.
By adjusting padding, the class size stays the same (72 bytes
on 32-bit, 96 bytes on 64-bit; confirmed via static_assert.)
A quick benchmark running "new/delete BMessage" in a loop on 4
threads at once goes from 30-36 seconds before this commit
to around 13-17 seconds, sometimes as low as 3 seconds, afterwards,
so clearly this is a significant improvement.
This also eliminates another BLocker allocated on application startup.
Change default interrupt value to be invalid, current default is a
valid interrupt on x86 platforms.
Change-Id: Ieecf7bcbc6b0aeb4fe62a505ae9765c73ecaa74c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10401
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Some hypervisors claim to implement/advertise Hyper-V i.e. Xen and
VirtualBox. Check for all required features when probing to prevent
loading on hypervisors that do not fully comply with Hyper-V
specifications.
Change-Id: I7c1188a433cad5eff91dcffe9520a55926d0f4b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10400
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Custom background image is disallowed on the Desktop folder and Root
aka "Disks" folder. However, you may use a default background image.
We store the background image on the node, Desktop window and the
actual Desktop share the same node so we have to explicitly disallow
background images from showing on Desktop windows.
Make UpdateBackgroundImage() protected.
Remove unused BDeskWindow::UpdateDesktopBackgroundImages();
Handle all background image code in ContainerWindow. BPoseView calls
its window if targetted to update its background image.
Fixes Desktop background portion of #19947.
Change-Id: I4b104340b5a69807961b99bde7b0455d7d58065a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10392
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku currently does not have any form of Hyper-V guest support, and
this change begins work toward #16664.
This change implements initial VMBus bus/device structure and functions.
Change-Id: I2d081f55e99da479d9bc5084f1815ade6cc77fe2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10333
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
It seems in some applications (though not most of the ones I
initially tested) this can get used recursively, so we need
a recursive_lock in order to not deadlock.
Also commit a missed change from the previous commit.
X512 pointed out that ServerLink is inherited by PortLink which is
used by all windows, so the original change had the unintended effect
of allocating another semaphore for every window, which isn't wanted.
So, just use a static mutex here also.
* Currently the DEL key is intercepted by a shortcut registration for
the Tracker "Move To Trash" menu option.
* Allow key event propagation to continue if a shortcut that does not
use the CMD key is disabled.
Fixes#19870
Change-Id: If16d3858cee61dfd1862b379fbcfeffebe617341
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10226
Reviewed-by: waddlesplash <[email protected]>
* Added static_cast<uint32> to resolve type mismatch warnings between
signed integer(fSlots[level] and slot) and unsigned integers(ItemCount()) during compile
* eliminated a potential unsigned underflow vunerability when a node
is empty in NextLeaf() traversal logic
Change-Id: I8534f31cac9dec41e04e16989427dc7d9abb26ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10363
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Fruit De La Passion <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Fallback to DBG2 if SPCR is not present while discovering UART serial
devices. DBG2 is newer than SPCR but does not provide the same
information, and it appears that both can exist on the same system.
This has only been tested in Hyper-V which exposes DBG2.
Change-Id: I6a75114f4287b6db289b544c3b80a66a625fb6c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10354
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
* Fix warnings by adding two casts
* Activate Werror for all graphics drivers
* Remove options to disable Werror for individual graphics drivers, can later be re-introduced, if *really* necessary.
* Part of ticket #9460
uintptr_t is intentionally used although a physical address is concerned. Using phys_addr_t would require additional casts at other places.
Change-Id: Ife6dbcf809b6537427f318460e41cdc056e7d964
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10386
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
The case where no BApplication has been created at the time of fork
is not blocked by this change (as it might be useful in fork-to-background
before creating a BApplication.)
Reinitializing or recreating a BApplication where one already exists,
though, is not supported by the kits, and just leads to problems.
And when the global destructors are invoked after a fork, such as by
exit(), then the parent team's state may be corrupted due to the
deletion of BLocker semaphores or other global state.
So, we thus set be_app to an invalid pointer, and if terminate_after()
is called with this pointer, we invoke debugger().
(We should really just prevent semaphores from being used across
processes unless explicitly specified, but that would be an
API compatibility break from BeOS, so we'll need to do it carefully,
or not until after R1.)
Would have clearly caught the problem in #18576 and the linked thread.
They don't work properly after a fork, and if exit() is called
from the forked child, the parent won't be able to use them
anymore.
In BBitmap and BPicture, replace them with mutexes. For AppServerLink,
make the private ServerLink inherit from BLocker, and then use
that one directly.
This also is a slight efficiency gain, as we don't need to create
multiple semaphores from the static initializers now, which is
just a waste of time in the case of applications that don't
even need these locks but link to libbe.so (e.g. CLI tools.)
Part of #18576.
This now does what notify_if_stat_changed used to, fixing a
race: if some thread was modifying a file, and some other thread
(or the same thread, in some other mtime-updating operation)
updated that file and this called MarkUnmodified() before the
first thread close()d it, then when the first thread called close(),
no node monitor notification would've been sent, as fModified
would've already been unset.
So, now every time we are to mark a file "unmodified", we also
send the node monitor notification at the same time.
Fixes the remainder of #19910.
This reverts commit 902921a554.
This broke resolution of CNAMEs, including the Haiku package repos.
Since pkgman uses our own HTTP implementation, which doesn't set
AI_V4MAPPED at all, this shouldn't have been a behavioral change for
it at all, much less having broken it.
Change-Id: If38b6a81c1144101ddea7d1f8d401326675479e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10388
Reviewed-by: waddlesplash <[email protected]>
If a context switch happened between the messsage being
sent and received, we don't need to invalidate.
Brief testing on a 4-core VM shows this happens relatively
rarely during compile jobs (expected, most processes are
single-threaded), but very often while running multiprocess
web browsers. Some INVALIDATE_PAGES are skipped, but mostly
INVALIDATE_PAGE_LIST is (by the thousands.)
Change-Id: If32ed95139e0db3770054f6ef3f72c9aecb9394d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10350
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>