They call out to other library functions, which are better optimized
than the old naive implementations.
Add -fno-builtin to the musl strings Jamfile, otherwise GCC
generates infinite recursion in strcpy, apparently.
for get_dir_path_and_leaf: the leaf is .
for create_vnode: when a name is ., can't be created.
this means dir_create() can ignore trailing slashes (like #2016)
this fixes golang test TestRootConsistencyCreate/file_symlink_slash
Change-Id: Ib0ee956a8e2d28b572d44ba1be25a6d1341b0dfa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10387
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Converting points array to `BPolygon` has significant cost, including
heap allocation, when drawing a lot of polygons.
Change-Id: I81e6b4031bac4beadcc79412c58eedddffc00a82
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10337
Reviewed-by: waddlesplash <[email protected]>
This allows us to gracefully fail if memory allocation fails,
rather than panic()ing. If a single-threaded application tries
to wait on a non-shared user_mutex in single-threaded mode, it
will now be dropped into the debugger.
... instead of top-left of view bounds.
This only affects backgrounds inside windows (not on Desktop).
The view bounds may be scrolled over but we don't want to draw the
background from the scrolled over position, we want to draw from
the top-left of the window which is the top-left of the extent.
We also have to set the icon origin in the view state to the extent
instead of the view because it will be different if scrolled.
Change-Id: Ieff9d0a66086d116d46ffbd713b2dcd45d312870
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10413
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
* Use CPPUNIT_TEST(_SUITE) macros and autoregistration.
* Remove unnecessary header files.
* Consolidate Archivable, Autolock, MemoryIO and MallocIO tests into
one .cpp file.
* This structure makes it easier to add new tests - from adding .cpp
and .h + updating Addon.cpp file (3 files), only one .cpp file is
needed now.
* Convert string_utf8 test from standalone app to CppUnit test.
Change-Id: I18d90eb66b7cfc5576626b66ed85e47eb64547bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10399
Reviewed-by: Kacper Kasper <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This adds a new job to the Package Kit, and an invocation
in pkgman after changes are applied. The job takes a time_t before,
and an int32 minToKeep, and (after confirmation) deletes all state
directories which were last modified before that time, but also
keeps at least the minimum specified.
pkgman defaults to calling it with (now - 30 days, minimum 10).
SoftwareUpdater does the same, but without bothering the user
and just defaults to doing the cleanup.
Change-Id: I15f5232b11daba5955e7fa07f696ad7785507931
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10404
Reviewed-by: waddlesplash <[email protected]>
It doesn't refer to some random old state, but the currently active
one. (If the currently active state is the default one, then it will
return nothing.) So, this should make things clearer.
Change-Id: Ib3fe842f5fb51eaf2ef2f31bad8b292b47a3fb36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10403
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
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]>