Commit Graph

64138 Commits

Author SHA1 Message Date
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
Augustin Cavalier
50d29435e9 app_server: Mild cleanup to ScreenManager.
The #ifdefs for test mode are now more appropriately located.
2022-07-06 19:53:30 -04:00
Augustin Cavalier
5c3aa92735 app_server: Refactor and improve graphics device iteration.
* Do not open() devices while looping but only open() the one
   we were actually asked to open.

 * Try the VESA or Framebuffer driver even if deviceNumber is something
   other than 1.

 * Start iterating at 0 instead of 1 following loop iteration changes.

Ideally this iteration should occur a completely different way, in order
to properly support multiple graphics cards, but that's a problem for
another day.

Fixes #4303.
2022-07-06 19:52:23 -04:00
Augustin Cavalier
ab8109c152 app_server: Fix build of test_app_server. 2022-07-06 18:10:14 -04:00
Augustin Cavalier
a68b6c2579 app_server: Move DWindowHWInterface and ViewHWInterface to a subdirectory.
AccelerantHWInterface and the Remote engines already did this.
These are not used at all outside of test_app_server, so we do not
need to even compile them in to the regular one.
2022-07-06 17:56:12 -04:00
Augustin Cavalier
40d99076df openbsd_network: Move mbuf_list and mbuf_queue into mbuf-obsd.h. 2022-07-06 17:23:40 -04:00
Augustin Cavalier
0297582112 openbsd_network: Implement two mbuf macros in terms of FreeBSD ones. 2022-07-06 17:07:49 -04:00
Augustin Cavalier
41d93c5ed1 freebsd_network: Do not deinitialize USB if we never initialized it.
Fixes some "mutex not owned" KDLs seen on deinitialization.
2022-07-06 16:03:46 -04:00
Augustin Cavalier
19453ce798 freebsd_network: Unlock taskqueues before final destruction.
This is needed for MTX_SPIN taskqueues.
2022-07-06 16:03:46 -04:00
Máximo Castañeda
ab52604b90 arm syscalls: add explicit dependency
Some syscall headers are generated during the build process, and jam is
not smart enough to add an automatic dependency.

Change-Id: I7c19da7aca9da4a52c4537a5f5c279fdbe24a48a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5435
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 18:03:45 +00:00
Augustin Cavalier
f5eecfe4ea openbsd_network: Remove shadowing variable. 2022-07-06 13:42:43 -04:00
Augustin Cavalier
138d4bbd68 nvme_disk: Refactor 64-bit BAR handling into nvme_pcicfg_get_bar_addr_len.
Then invoke this function in nvme_pcicfg_map_bar instead of duplicating
the logic.
2022-07-06 13:42:43 -04:00
Jim906
5e0c100f78 BFilePanel: use position from FilePanelSettings
* Set a flag if TFilePanel::RestoreState successfully reads the
  FilePanelSettings file.
* Check for this flag in BFilePanel::Show.
* Part of #17374.

Change-Id: I4431c01f9282fe411fa7b30667215bba9249bd96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5433
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-06 16:03:10 +00:00
Augustin Cavalier
d6fedd7fcf Userguide CSS: Fix banner color. 2022-07-06 12:01:20 -04:00
Pascal Abresch
05844f660c Userguide CSS: add dark mode
Change-Id: I94c308ea22a304f061544a28e1490b9c004191d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5329
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-06 15:49:23 +00:00
Augustin Cavalier
06b68f46f9 kernel/fifo: Add missing check for B_SELECT_READ in Deselect().
This should have been part of 27fda3e46f.
Fixes #17826.
2022-07-06 11:13:00 -04:00
Augustin Cavalier
6fd4a3eea9 XHCI: Set the DIR_IN bit on Status Stages even if there is no data.
The referenced section of the specification gives no indication that
the bit should not be set if there was no data; indeed it indicates
it should always be set.

This brings our behavior here in line with other OSes seem to do.

Change-Id: I86b2eb2a6a5fa3af84fd0941e0a3ec601c7037bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5421
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-04 17:14:45 +00:00
David Karoly
2e0a9b9554 kernel/arm: use generic/user_memory.h
Change-Id: I890bdd7d6f64162416a1a80c7d8280618aaa8fb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5429
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-04 16:43:39 +00:00
David Karoly
1b95b1e857 kernel/arm/int: convert TRACE to new syntax and hush
Change-Id: I8945ad621aee2bc1c8d8852bb1c220936e567d86
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5430
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-04 07:00:03 +00:00
Augustin Cavalier
e0a405d765 openbsd_network: Use the new bus_dmamap_sync_etc.
This preserves the semantics of partial syncs. Unfortunately in my
testing it does not seem to improve the packet loss I was seeing...
2022-07-01 23:16:28 -04:00
Augustin Cavalier
b12b802c4d freebsd_network: Add an extended bus_dmamap_sync API for partial syncs.
To preserve proper semantics with the OpenBSD layer, this is needed.
2022-07-01 23:15:07 -04:00
Augustin Cavalier
7ff2f10462 OpenBSD wlan drivers: We cannot back out of initialization at preinit.
Otherwise we get KDLs. Fixes #17811.
2022-07-01 22:09:06 -04:00
Augustin Cavalier
27fda3e46f kernel/fifo: Properly support opening FIFOs in O_RDWR mode.
While pipe() only supports a read end and a write end, named FIFOs
are supposed to allow opening in read/write mode (which, indeed,
is something the Fish shell seems to require.)

The code that checks open_mode in the read/write routines was introduced
all the way back in 2003 (2469f26dfc).
At that time, the VFS did not do open_mode checks on FDs in the
I/O syscalls, so these doubled as permissions checks. Now, however,
the VFS does check that in common_user_io, so we can remove these
entirely and let things behave as they should.

Additionally, there is now also no reason to prevent select()ing
on both events for the same FD independent of open_mode, so
allow that too.

Change-Id: Ib3cba76d18e91b7c00d1695e8d29dd47cae06b79
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5427
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-01 18:57:28 +00:00
David Karoly
fe3405c087 kernel/arm: ensure page dir is correctly aligned
Page directory physical address must be aligned on 16K and
it must be mapped to a contiguous physical region.

Change-Id: I6723023c9deaa1c4a1081cf5a984a1766241a532
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5423
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-01 18:39:30 +00:00