Commit Graph

66057 Commits

Author SHA1 Message Date
Diego Roux
8b32e9b4ac virtio_sound: setting up driver to be loaded.
Change-Id: I25c99e3e06e52448968bd8210b2f0599d129a7bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7776
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-13 08:05:17 +00:00
Andrew Lindesay
c1cc7751a7 ColumnListView: Status view w/ scaling
Visible in HaikuDepot when the font is scaled, the placement
of the BColumnListView is broken owing to the calculation of
the height of the scrollbar being based on a constant.
Fixes #17900.

Change-Id: Id34138feb491618a4c685b7cdb88b875e3ec5329
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7726
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-12 16:34:24 +00:00
Zardshard
984f843b91 HaikuBook: document missing BBitmap constructor
Change-Id: I4fc51b0e499f9cb5e5c4ce58d6baddf462322b3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7719
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-06-10 16:36:12 +00:00
Jérôme Duval
c5a740cdb2 gnu: add pthread_setaffinity_np()/pthread_getaffinity_np()
* also sched_setaffinity/sched_getaffinity() added.
* add a test

Change-Id: Id8c308788f6364f5340b4991def2fbb9a05da728
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7675
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-10 16:34:25 +00:00
Jérôme Duval
f7a85eea15 kernel: add syscalls for thread affinity
scheduler modes adapted to take into account the thread affinity mask.
when no cpu in the affinity mask is enabled, the mask is ignored.

Change-Id: I577737441ab073941a4c5e06f94f7825cffdc2c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7674
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-10 16:34:25 +00:00
Jérôme Duval
1dde4c4b94 kernel/smp: change CPUSet::SetBit() and CPUSet::ClearBit() bit order
add CPUSet::And() and CPUSet::Matches().

Change-Id: I210c900527f6ee246916d5eb4547d8003c2bc631
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7673
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-06-10 16:34:25 +00:00
Andrew Lindesay
75a70554d9 HaikuDepot: Pkg name on window
When HaikuDepot is opened to view a specific HPKG file,
then show the name of the package in the window title.
Closes issue #18909.

Change-Id: Ib8095ef818dd3dc62b06cbc217f2056f36c8ac46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-10 16:33:06 +00:00
Andrew Lindesay
6498155189 HaikuDepot: Add rating; escape
Simplify logic around escape closing the add
rating window

Change-Id: I74dd5bf29e462d6b06deef3977acf30b033d5c71
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7722
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-10 16:32:43 +00:00
Augustin Cavalier
365b32bb6e kernel/team: Set team arguments during load_image/exec_team.
This way, by the time we send a notification, the arguments
are already set even if the main thread has not yet started.

Fixes #12703.

Change-Id: Ib93b4b16bffa8cb943cf6389f0f72dce89f9749b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7702
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-06-10 16:32:09 +00:00
Trung Nguyen
9631ca7349 kernel/debug: Report team/thread exit status
Add a field to `debug_[team/thread]_deleted` to report the exit status
on the corresponding events.

This is useful for debuggers like GDB expecting a return value when one
of their inferiors quit.

Also add a `usage` field to `debug_team_deleted` since this is another
potentially useful piece of information exposed by the `waitpid` family
of syscalls.

Change-Id: Ieff7c31f56b1b9f8f709725d19050273b21f2504
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7736
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-06-10 16:31:38 +00:00
Andrew Lindesay
7a5148b345 HaikuDepot: Remove email
The email on the program listing has never been used.
This change removes this. Closes issue #18274.

Change-Id: I45c679059b334d25c892bfbb6010e0821a84ac38
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7720
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-06-10 16:30:52 +00:00
Autocomitter
9c29972eca Update translations from Pootle 2024-06-08 08:14:55 +00:00
Autocomitter
3e910e720f Update translations from Pootle 2024-06-01 08:15:21 +00:00
Augustin Cavalier
2e01121f19 kernel/vm: Only prevent access to the physical allocated ranges.
The physical memory ranges will actually be used again
later on during post-modules VM setup. The allocated ranges
are what we really want to prevent access to, anyway.

Fixes #18907.
2024-05-30 12:14:36 -04:00
Augustin Cavalier
2b06e3ea48 BScrollView: Only adjust other dimension if it's greater-than-zero.
And add an inline comment with a bit of explanation,
since this logic has now been revised multiple times.

Fixes #18690.
2024-05-29 19:31:58 -04:00
Augustin Cavalier
fb79b8994f Appearance: Only Select() if we are attached to a window.
Otherwise the appropriate message won't be sent.
AttachedToWindow() will take care of selecting
in that case.

Fixes #18891.
2024-05-29 19:02:55 -04:00
Augustin Cavalier
bd25d788a2 kernel/slab: Disable the block allocator entirely if disabled.
block_alloc and friends are now declared as static, so we got
GCC errors about unused functions when USE_SLAB_ALLOCATOR_FOR_MALLOC
was 0. So, instead, just don't initialize the block allocator
at all.

This was the change that triggered the prior commits: if the
block allocator is completely disabled, the first object
allocated through an object_cache is inside VMAddressSpace
initialization, which happens during the interim period
mentioned in previous commits.

Haiku now can be built and booted all the way to the desktop
with the kernel guarded heap enabled (and without the guarded
heap substituting for the object cache.)

Change-Id: If2f08a741826799127ecfd263d6c82ed4263eaab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7701
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-05-29 18:10:06 +00:00
Augustin Cavalier
7133a49e81 kernel/slab: Allocate one area upfront when the debug heaps are in use.
See inline comment: if we don't, we'll try to allocate pages
during the post-page-init but pre-area-init period, which
isn't possible (and after the previous commit will properly fail.)

Change-Id: If8392417e05912c8cfc417222abab3b39cb15bf1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7700
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-29 18:10:06 +00:00
Augustin Cavalier
ebc1a034fb kernel/vm: Prevent access to kernel args physical ranges after page init.
Otherwise, vm_allocate_early_physical_page could try to use them to
allocate more physical pages, which isn't legal as page state
management is now the responsibility of the vm_page system.

Discovered while working on re-activating the guarded heap.
In that case, at least, the illegally allocated pages were caught
by the memory manager trying to convert them into areas,
but they weren't marked WIRED and so tripped asserts.

Change-Id: I39af70bf8a652511bb65fe2154bba16d4ba5c924
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7699
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2024-05-29 18:10:06 +00:00
Máximo Castañeda
61db1f4908 kernel/arch: Fix format specifier for area_id
Change-Id: I1430a68c92fa9c5db96b0d36cc01242ccbf456de
2024-05-29 13:55:30 +02:00
Augustin Cavalier
0b4eefc5c8 kernel/vm: Fix printf specifier for page_num_t.
Should fix a -Werror on 32-bit.
2024-05-28 23:24:53 -04:00
Augustin Cavalier
8d63c2f657 kernel/x86: Fix double fault stack allocation.
This has been broken since January 2014, from a change made during
the scheduler refactor (527da4ca8a).

How nobody seems to have figured this out since then, I have no idea,
especially since the 32-bit initialization routine had the
critical function (x86_get_double_fault_stack) commented out entirely.

Even if it wasn't commented out (and it wasn't for 64-bit), it wouldn't
have worked, because the double-fault stacks were not allocated
until "post-VM", while the TSS is set up during "preboot" (basically
just after kernel entry.)

We now take care of this by allocating the virtual address for
the stacks immediately, and then creating an area for it
in the "post-VM" stage. This means that any double-faults
which occur before the post-VM stage will just triple-fault,
but seeing as all double-faults have been triple-faults
for the past decade, that's probably fine. (In order to get a
double-fault stack that early, we would probably need to
have the bootloader allocate it for us.)

This must be working, because it changes #18692
from a triple-fault (instant reboot) into a double-fault KDL.
2024-05-28 23:06:53 -04:00
Augustin Cavalier
56c6878258 kernel/vm: Add sanity check for page_num in "page" KDL command.
On some rare memory-corruption KDLs, I have seen pages with
"0" for all fields including page_num. So now we compute the
expected page number from the page's offset into sPages
and print an additional line if it doesn't match what's in the
page structure.
2024-05-28 17:04:18 -04:00
Augustin Cavalier
d12b3a0e1d kernel/socket: Allow the network stack to be unloaded on KDEBUG kernels.
This includes nightly builds; but at least we keep the efficiency gain
on release builds.
2024-05-28 16:32:13 -04:00
Augustin Cavalier
6b99b20692 telnet: Synchronize with FreeBSD 13.3. 2024-05-28 16:23:27 -04:00
Augustin Cavalier
0c84b78dd3 ftpd: Synchronize with FreeBSD 13.3. 2024-05-28 16:08:22 -04:00
Augustin Cavalier
45383846d8 kernel/fs: Translate ioctl(FIONBIO) into fcntl(F_SETFL).
This way, FIONBIO and O_NONBLOCK will no longer get out of sync,
and additionally, FIONBIO can be used to change non-blocking
status of regular (non-socket) FDs, too (which some applications
seem to take advantage of, to avoid needing to fetch the open_mode
before calling fcntl.)

Change-Id: Id894fe76c79ac373c0121a003d68180a3d9b6560
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7697
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-28 19:05:22 +00:00
Augustin Cavalier
e08f7fd12b kernel/vfs: Slight refactor to F_SETFL to reduce duplication.
No functional change intended.

Change-Id: Ida1dd3b1629836d3d48598bb98bc2c56cdcf869f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7696
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-28 19:05:22 +00:00
Augustin Cavalier
560f1681fa listattr: Needs <time.h>.
Seems to be implicitly included on Haiku, but for <build>listattr
on Linux, it's needed.
2024-05-28 14:55:32 -04:00
Augustin Cavalier
85ae477c41 libroot: Remove obsolete comment in fs_attr implementation.
We've had special syscalls and used them for many years now.
2024-05-28 14:55:03 -04:00
Augustin Cavalier
68f76d61d7 libroot_build: Add a "hex-encoded attribute names" mode.
Some systems (e.g. NTFS through WSL1) support arbitrarily-large
extended attributes, but do not preserve case on attribute names
(or disallow more characters than the existing manglers took
care of.)

So, this adds a mode in which attribute names are encoded as
hexadecimal. At present it must be manually enabled; in the future
it may be possible to modify ./configure to activate it
automatically.

Change-Id: If20e4cb1cf4153cccc918ce6d51761426055290c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7698
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-05-28 18:51:45 +00:00
Augustin Cavalier
61eed15db9 kernel/socket: Refactor {get|put}_stack_interface_module and keep it loaded.
* Make the consumer-count int32 atomic, avoiding the need for
   all get/put operations to go through a global lock.

 * Disable the code that unloads the stack interface when there
   are no consumers. Otherwise, we wind up repeatedly loading/
   unloading the stack interface during the boot process (e.g.
   while sockets are being created and destroyed during net_server
   startup.)

   In the future, if we want to really unload it, we can add some
   interaction with low_resource_monitor or something like that.

Reduces register_domain call count during boot from 31 to 7
(it appears the stack was loaded and unloaded 5 times, before
it stayed loaded the 6th.)
2024-05-27 19:45:57 -04:00
Augustin Cavalier
757031348e network/stack: Unload all modules at end of scan process.
Otherwise, modules that depend on each other will be repeatedly
loaded and unloaded. This reduces the number of register_domain()
calls on a standard boot (of @minimum, at least) from 43 to 31.
2024-05-27 19:45:24 -04:00
Augustin Cavalier
a03edeab4d sdhci_acpi: Disable tracing for now.
It adds a lot of log spam even on systems without any such devices
(due to device detection.)
2024-05-27 19:36:38 -04:00
Trung Nguyen
1834e12564 headers/bsd: Remove Haiku-specific include deps
Remove the `ByteOrder.h` and `SupportDefs.h` Haiku-specific headers
from `bsd/endian.h` on GCC >= 4 and replace them with compiler builtins.

This prevents some unwanted symbols like `type_code` causing name
clashes in ported applications.

Change-Id: Id88791ea5954c260f4e7f5e82a564f3ae6bafe69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7642
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-27 22:05:09 +00:00
Autocomitter
ef761f9fba Update translations from Pootle 2024-05-25 08:19:02 +00:00
X512
747004e221 tracker: fix file name edit field misalignment
Font size have no direct relation with actual text line height and is a
choose of a font designer. Ascend + descent formula should be used to
calculate actual text line height.

`BRect` `right` and `bottom` coordinates are inclusive so it means for
example `BRect(0, 0, 15, 15)` width is 16 pixels.
`BRect::Width`/`Height` methods returns `right - left` and
`bottom - top` accordingly so actual size in pixels bigger by one. There
is some confusion that string width and rect width have a difference by one.

Change-Id: If29f8a2e6804a90e63dd2d92580160160229392f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7668
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-05-19 08:57:07 +00:00
Pascal Abresch
47c05920fd Docs: Document color_which UI colors
Change-Id: Ic8fef097ac6cc616ae962459c42f93109a1833ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7656
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-05-19 08:55:45 +00:00
Autocomitter
a257fb10cb Update translations from Pootle 2024-05-18 08:17:08 +00:00
Jérôme Duval
c38a5f9099 ProcessController: save and restore "Power saving" mode
fix #11823

Change-Id: I1284587fa814cd3e121e1c5913f0fe1e15865d9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7670
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-17 17:26:34 +00:00
Daniel Martin
370dde2255 CPUID returns CPU Features in EDX and extended features in ECX
No functional changes

Change-Id: I98a9e5c9658a5464ba6fa71bc5d2c5d646a57ab1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7672
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-05-17 17:25:26 +00:00
Máximo Castañeda
446ff222af Tracker: search for the localized decimal separator
Now that string_for_size return localized numbers, we can't assume the
decimal separator is a dot.

Fixes: #18900
Change-Id: I872d75b0e9e4eb5d085e04bfd4e8c26101a5b1b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7671
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-05-17 07:24:37 +00:00
Autocomitter
c110a061f1 Update translations from Pootle 2024-05-11 08:25:09 +00:00
Murai Takashi
ddbb992956 file_systems/QueryParser.h: Fix -Werror=maybe-uninitialized
Fix fPosition and fTerm not being initialized when expr is NULL
at line 1162.
Pointed out by GCC14.

Change-Id: If883ac0cc32e3418d0e3b49b42012efd861d65f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7641
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-05-08 16:08:05 +00:00
Murai Takashi
0ec6e1ceb8 rtl8125: Fix -Wreturn-mismatch
gcc14 seems treat return type mismatch as error.

Change-Id: I4cf2955a5813f4913204900f7974d9a58394319d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7639
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-05-06 06:48:41 +00:00
Murai Takashi
f82119e910 inbound_protocols/imap: Fix GCC 14 build
Same as GCC 13, GCC 14 warns unused result.

Change-Id: I49f286f1dff1c7baf786baf4b271085d23d4bad5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7640
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2024-05-05 13:13:02 +00:00
Jérôme Duval
baa67e1184 boot/bios_ia32: check that the vga mode was successfully set
before trying to write to the frame buffer.
* QEMU can now be started without a standard vga output (-vga none).

Change-Id: Id46cd4d70ce16e2156e0b0668fb88f09112067a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7667
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-04 17:05:40 +00:00
Autocomitter
205b8694e5 Update translations from Pootle 2024-05-04 08:21:01 +00:00
Máximo Castañeda
7766057761 CharacterMap: fix hex representation
Fill the buffer also for NUL character.
Give the buffers at least the minimum needed: 4 characters for each of
at most 4 bytes and an extra one for the ending NULL.

Fixes: #18651
Change-Id: I1ca931ad5673baaca3fb08ebfe189dca7093c80e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7666
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-03 21:15:18 +00:00
PulkoMandy
7d5b913b51 BCatalog: declare GetString as format_printf function
This tells the compiler that this function takes a format string as a
parameter, and returns a "similar" string with the same formatting
operations. This allows the format string to "propagate" to prinf-file
functions (including BString::SetToFormat) and the format string to be
actually checked with the arguments passed to that function.

Without this, all translated strings were not checked to match with
their arguments.

Change-Id: I5c3c5cbfe7dfede9a6f45cad47a7524f9138fac0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7663
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-05-03 16:38:23 +00:00