Commit Graph

64111 Commits

Author SHA1 Message Date
Augustin Cavalier
5e596efecf Refactor touchpad movement generation by migrating MovementMaker to userland.
This considerably overhauls touchpad event generation, simplifying and
cleaning it up considerably:

 * Return the touchpad specifications through the MS_IS_TOUCHPAD ioctl.

 * There is now a dedicated MS_READ_TOUCHPAD ioctl, as touchpads
   can either return touchpad_movement structures or mouse_movement
   ones depending on what mode they are operating in.

 * Event repeating on timeouts is now handled in MovementMaker and
   the input_server control thread, so MS_READ_TOUCHPAD takes
   a timeout value. This means we can drop all the EventProducers.

 * Use the real floating-point math functions in MovementMaker now
   that we are running in userland.

 * Drop unused structures, constants, headers, and other things
   related to touchpad support.

Change-Id: I28cdb28e4100393a9338a8ebb865573cec13fc1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5455
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-18 16:00:29 +00:00
David Karoly
1f26a521ac kernel/arm64/int: add missing header
Change-Id: I776271bb117f854783a6ae6bcdba591eafb27fa5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5481
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-18 09:08:18 +00:00
PulkoMandy
abc159e3fd docs/develop: explain vendor branches for gcc and buildtools
Change-Id: I9bb3b4efd2d02013da1ec6656adb49cd7d050e86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5476
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-17 07:37:53 +00:00
Jim906
3f377da09a BFilePanel: save state less often
* Change BContainerWindow::fStateNeedsSaving from private to
  protected, so that TFilePanel functions can set it to false, like
  the analagous BContainerWindow functions do.
* Prevent fStateNeedsSaving from being set to true because of a change
  to window size/position, unless the window is active.  This is
  meant to distinguish changes made during object setup from changes
  made by the user.
* Add more calls to ViewState::_StorePrevious state.
  BContainer::fPoseView triggers saving on some occasions because its
  member fViewState needs to save. fViewState needs saving when there
  are mismatches between pairs of f[x] and fPrevious[x], e.g. fIconSize and
  fPreviousIconSize. These mismatches can arise when the ViewState
  is set up. These pairs are synchonized by _StorePreviousState.
* Rearrange the modified ViewState functions to keep the 'const'
  modifier on the existing code.
* Fixes #17374.

Change-Id: I2a6c1c1d9c5c3656eab2ebc770a5915010e7500c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5447
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-17 07:37:10 +00:00
milek7
f48e3c0f37 arm64: Wire up ACPI
Change-Id: I62ce53179d0c073680df403434b01b0404c53378
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5270
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-17 07:36:53 +00:00
David Karoly
4561a1992f arm64: Wire up FDT
Change-Id: Ib6f60e6d703e9413eb4cef3ec77686cfd71f8e73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5478
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-17 07:36:53 +00:00
Máximo Castañeda
00a1f24972 PicturePlayer: update debug strings
Change-Id: I64a7dead30b8f484b63ba4d8055d93c626447755
2022-07-16 20:33:58 +02:00
David Karoly
fbe8805dd6 kernel/arm/vm: convert TRACE to new syntax
Change-Id: Id9c078279320fdfa45b29a49f40bdcb9520ac21e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5454
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-16 10:34:25 +00:00
Autocomitter
91a3609837 Update translations from Pootle 2022-07-16 08:19:12 +00:00
milek7
5be45ee70f arm64: Map discovered UART into kernel space as device memory.
Change-Id: I4af09410c29c5586b85e1e1eba5803c0b30a1b01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5272
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-15 20:14:09 +00:00
Fredrik Holmqvist
9ee255851d Remove ISA floppy driver code
We removed config_manager which the code is based on, and
the driver was not working before that.

Perhaps it is time to pour one out for the floppy driver?

Change-Id: I306f7bda08ad8fe3f64b55cb147a1e2dea6ddfef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5221
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-07-15 19:36:37 +00:00
David Karoly
75c76bec99 kernel/arm64/vm: introduce TRACE
Change-Id: Ia1fa2383743bd054fec96ee6fb7471b423272810
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5453
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-15 17:26:53 +00:00
Alexander von Gluck IV
fd482d0a57 docs/develop: Introduce release engineering documentation
* This has been floating around on trac forever.  We should formalize
  these steps to help future Haiku releases to be successful.

Change-Id: I5881e27a23e66a18539d04c5977593a827f8fcef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5441
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-15 15:31:13 +00:00
PulkoMandy
c8641d3a23 ramfs: enable -Werror
Change-Id: I02600442bb2cb28182e6fd2da4eb849621c1b877
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5439
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-15 14:54:27 +00:00
PulkoMandy
6325257204 nfs: enable -Werror
Change-Id: I529f0e2b363a36984d8779535a2da51a882a988c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5438
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-15 14:54:27 +00:00
Pascal Abresch
92eeb4af7d apps/musiccollection: build fix
Change-Id: Ia2d4f5b9b80d9385c60136f8f6185c820be2181b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5446
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-15 11:17:15 +00:00
PulkoMandy
5d1501ed1b reiserfs: enable -Werror
Change-Id: I2f431efee7b5d75c33bf6355e2a9e61ed233465c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5437
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-15 10:59:58 +00:00
Mashijams
acdb3654fe xfs: V5 block and leaf directories
- Implemented V5 Block directory fields and virtual extent data header class to handle both V4 and V5 block directories.

- Implemented V5 leaf directory fields and virtual extent leaf header class to handle both V4 and V5 leaf directories.

- Implemented all checks for buffer headers.

Change-Id: I8f994d9ba792f40ba827cd5cee915b7b11796ce3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5432
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-14 07:12:34 +00:00
milek7
07c6982fa6 arm64: Add userspace entry wiring.
Change-Id: I53ecd2208e1c29271f85396d01c63509705ee840
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5266
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-14 07:09:02 +00:00
Augustin Cavalier
9d80098e24 app_server: Add casts to appease GCC2. 2022-07-12 18:40:48 -04:00
Augustin Cavalier
112fc3532b app_server: Basic scaling for window borders.
This code is quite convoluted and very much in need of refactoring,
but this solution works well enough for the time being. It does not
look quite right at higher resolutions (borders come out darker than
they do at the default resolution), but at least the borders are now
the correct size instead of a constant one.

The resize nub drawing code also hasn't yet been updated, so while
it draws the gradient over the full resize area and responds to clicks,
the "checkerboard" pattern is drawn at a fixed small size still.

Nonetheless, this is a significant improvement.
2022-07-12 18:19:24 -04:00
Augustin Cavalier
644fa4bf7b kernel/scheduler: Reset the invoke_scheduler flag on reschedule.
There is nowhere else that unsets it (or makes sense to unset it),
we have to do it here, or otherwise it will never be unset.
This has actually been broken since the new scheduler was merged
many years ago; the old scheduler (which had more complex logic here)
unset this flag correctly.

This oversight mostly did not cause obvious problems: while the scheduler
would be invoked unnecessarily on every single interrupt, that would
be a minor performance downturn at most. But there is one other effect:
since we can only reenable interrupts after invoking the scheduler,
"post_interrupt_callback"s of threads were not invoked most of the time.

The main user of "post_interrupt_callback"s is the profiler, which uses
them to trigger buffer flushes back to userland. Since they were not
invoked, the buffer would quickly fill up and then no more results
would be recorded.

Thus, this fixes #16345.
2022-07-12 13:47:05 -04:00
Dale Cieslak
094079b8c5 BFont: Implement BFont::BoundingBox
Extracted as separate patch from CR 4790; implement BFont::BoundingBox
as it was in BeOS. Returns a BRect that encloses any character in a
font, scaled by the font size.

Since the FreeType bbox is only valid for vector outlines, for bitmap
fonts, return a BRect with the dimensions of the bitmap font that is
closest to the font size.

Tested with CharacterMap. Will update CharacterMap to use the bounding
box once this change is landed.

Note that bitmap font rendering doesn't appear to work at all.

Change-ID: I8fc42ca0ddc0c77e04e0216001cd17e086ec7495
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5431
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-12 16:08:46 +00:00
David Karoly
764c0853e8 kernel/arm/thread: convert TRACE to new syntax
Change-Id: Iaf2876b92c130196a671f274e5fc36f6cccf1d0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5445
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-11 19:34:03 +00:00
Máximo Castañeda
eedb92aace app_server: fix reporting of Origin in scaled views
The local state scale is applied from the origin. That is, the origin
value does not change with the local scale.

This fixes the value returned by BView::Origin() when recovered from the
app server instead of from the client cache.

Change-Id: Id628d8f334fab06e6a6d084c079cdca1cfa914c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5443
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-11 17:51:22 +00:00
Trung Nguyen
d338200e2b libs/posix: Implemented new locale functions
Implemented the missing POSIX functions in <locale.h>:
newlocale, duplocale, uselocale, and freelocale, and also
provided missing type definitions for <locale.h>.

Implemented missing POSIX locale-based function variants.

Modified LocaleBackend so that it could support thread-local
locales.

Some glibc-like locale-related variables supporting
ctype and printf family of functions have also been updated
to reflect the thread-local variables present in the latest
glibc sources.

As there have been some modifications to global symbols
in libroot, libroot_stubs.c has been regenerated.

Bug: #17168
Change-Id: Ibf296c58c47d42d1d1dfb2ce64042442f2679431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5351
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-11 16:30:16 +00:00
Leorize
86fa1c21e1 Shared Kit: Introduce BMemoryRingIO, a thread-safe ring buffer
This commit introduces a simple thread-safe ring buffer implementation
based on top of BDataIO. The main use case for this class will be to
implement shared buffers between threads for the upcoming refactoring
of Services Kit.

Change-Id: I526bc044b28c91496ad996fabebe538e75647f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2966
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-11 16:29:53 +00:00
PulkoMandy
fb1d7157d2 ps2: do not publish keyboard device until mouse probing is complete
For mouse probing to work reliably, it's important that we don't
simultaneously send commands to the keyboard as well. This normally
happens because we don't publish the keyboard device until the probing
is complete.

However, if the mouse probing results in the keyboard sending some
replies, this can be detected as a "hot plugin" and leads to publishing
the keyboard device a lot earlier.

To prevent this, disable the "hot plugin" feature until we are done
initializing. This way the keyboard device is published only after we
are done with the probing.

Fixes #17806

Change-Id: Ia6a2b031550c845fa305df5b5f4d513d5c7931d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5388
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-07-11 16:09:23 +00:00
PulkoMandy
34596ea53f FAT: enable -Werror
Change-Id: I4364d1325d4822d7094e985991c97639038522b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5436
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-11 16:05:17 +00:00
Trung Nguyen
ae7395c833 libs/posix: Fix printf handling for %F format.
Before this patch, calling functions in the `printf` family and
passing %F in the format string, such as

    printf("%6.2F\n", 580.0f);

would incorrectly output numbers in the exponential format:

    5.8D+02

This patch fixes the output for this situation:

    580.00

and fixes the behavior for programs that use %F, such as
several tests for the `fish` shell.

Change-Id: I124a5a7b93b5f551fa190501a5778726812d347c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5424
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-11 09:52:59 +00:00
milek7
26a39bed4a PCI: Allow initialization to be deferred.
This is for platforms where information from parsed ACPI namespace
is necessary to fully configure PCI subsystem.

Change-Id: I8bdcfab6b99cbe7fdbc902b9fc13b44133325961
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5273
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-10 09:46:37 +00:00
Alexander von Gluck IV
62298adc03 accelerant/radeon_hd: Add missing newline to error message
Change-Id: Ic145f75ae8a05f901e6202fbb552260f7f74efe0
2022-07-09 08:41:41 -05:00
Alexander von Gluck IV
65462c8c81 accelerant/radeon_hd: Allow failure to init card
* Previously, any accelerants failing would cause an
  app_server crash.. so we would do everything in our
  power to get "something"
* After hrev56252, the app_server properly handles
  accelerant failures and vesa / framebuffer accelerants
  should will be used.
* Thus, if no monitors were detected (due to none being
  plugged-in, or some other fault), bail and return B_ERROR
  so vesa fallback can give it a try.

Change-Id: Ib9695dd7cf1914e50547ca8661c55b80152a66a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5442
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2022-07-09 13:35:24 +00:00
Joachim Mairböck
4043ac1867 Terminal: add missing newline to --help output
Change-Id: I2c8446c4049d723d0985858313972e44ac42bee1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5440
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-08 15:27:27 +00:00
Augustin Cavalier
4a2e65d8ee HaikuPorts/x86_gcc2: Update. 2022-07-08 00:18:31 -04:00
Augustin Cavalier
8fdcd41eec BuildFeatures: Remove versions from libraw and libavif SONAMES. 2022-07-07 23:18:45 -04:00
Augustin Cavalier
4726114d97 HaikuPorts/x86_64: Update. 2022-07-07 22:46:07 -04:00
Augustin Cavalier
4767301e20 haiku_datatranslators: Remove libraw version specification.
update_package_dependencies should take care of this for us.
2022-07-07 22:45:45 -04:00
Augustin Cavalier
1fca581180 bootloader & kernel: Build zlib with -Wno-error=missing-prototypes.
Will be needed for some newer zlib versions.
2022-07-07 22:45:19 -04:00
Augustin Cavalier
b5eee5ce22 openbsd_network: Correct return values of m_dup_pkthdr and m_tag_copy_chain.
FreeBSD's versions return 1 on success, OpenBSD's return 0.
Fixes at least some of the packet loss in OpenBSD WiFi drivers.
2022-07-07 16:41:49 -04:00
Augustin Cavalier
d51cccd9a5 Revert "freebsd_network: Adjust callout_reset to drain not stop callouts."
This reverts commit 259f9a76d8.

This does not work with callouts that reschedule themselves, which is
something certain drivers indeed do.
2022-07-07 15:46:47 -04:00
Augustin Cavalier
259f9a76d8 freebsd_network: Adjust callout_reset to drain not stop callouts.
As we are going to modify func/arg, we need to be sure they are not
even executing.
2022-07-07 14:58:02 -04:00
Augustin Cavalier
a73773b24e freebsd_network: Clean up struct callout.
* Remove unused flags field.
 * Rename internal members to have c_ at the beginning, like FreeBSD.
2022-07-07 14:57:23 -04:00
Augustin Cavalier
af11bc7bc7 freebsd_network: Correct time_uptime.
It should be in seconds, not ticks.
2022-07-07 14:56:33 -04:00
Augustin Cavalier
93f2021912 openbsd_network: Fix return values of timeout functions.
As far as I can tell, nothing checks these, so this should not
actually make any kind of difference.

The timeout_set change is also not a functional one, either,
as callout_init with mpsafe=0 uses &Giant also.
2022-07-07 14:44:53 -04:00
Augustin Cavalier
631f505f82 freebsd_network: Fix callout_active checking in callout_stop.
We have to perform the "due" check after checking callout_active,
because due is set to -1 while the callout is actually active.
2022-07-07 14:43:27 -04:00
Augustin Cavalier
fbff149ce2 openbsd_network: Refactor if_input_openbsd to use ml_dequeue.
Should not be any functional change.
2022-07-07 12:46:15 -04:00
Augustin Cavalier
e3056a7eff vesa & framebuffer accelerants: Drop engine hook stubs.
We don't need to provide them after the previous commit.
2022-07-07 11:52:51 -04:00
Augustin Cavalier
2270ca94f1 app_server: Make engine accelerant hooks optional.
We don't need them here, or anywhere else for that matter, to run.
2022-07-07 11:52:00 -04:00
Augustin Cavalier
6489b77dee nvme_disk: Fix build on non-PAE 32-bit architectures. 2022-07-06 20:55:04 -04:00