Commit Graph

10002 Commits

Author SHA1 Message Date
Augustin Cavalier
65cdc13e7d kernel: Migrate struct generic_io_vec to a private header outside src/.
This way it is more easily accessed from drivers outside the kernel,
which it soon will be, without having to add an explicit UseHeaders.
(The drivers that use it already all use the IOScheduler.)

No functional change.

Change-Id: Ibc2d2678e37d9d7ab73391cb17b72cca86f92132
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6477
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-30 17:54:28 +00:00
Augustin Cavalier
e223e8e94b kernel/x86: Initialize IO-APIC only after PCI enumeration is complete.
Before the PCI refactor, PCI initialization/enumeration occurred
immediately after the PCI module was loaded, and so by the time
we got to IOAPIC initialization, it was already complete.

After the refactor, PCI enumeration is deferred until slightly later,
and so we would try to initialize IO-APICs without knowing PCI
information. This would fail, as read_irq_routing_table needs to
have that available.

Hopefully fixes #18425, #18393, #18398.

Change-Id: I1e4b06367da26eeb10085a1c6322ed39885b632b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6476
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-29 19:44:32 +00:00
PulkoMandy
4dbd474753 Add BIconUtils::GetSystemIcon
Allow to easily access the alert icons and anything that's added to app_server
resources.

Fixes #10887.

Convert BAlert, Debugger AlertWithCheckbox and Keymap ModifierKeysWindow
to make use of it, removing the duplicate code to locate app_server
resources.

The resources are initialized only once (per application), so there is no need
to reload them for every access to the icons.

In the ticket there is discussion about putting this in BControlLook,
but I think this should in fact be moved fully into app_server with
special drawing commands for well-known icons. That would avoid loading
and rendering the icon on the application side to then send it to
app_server (especially in remote_app_server case)?

In any case, this simple API can serve as a base for applications to
use, and we can change how it is implemented later on.

Change-Id: Id370526ae5cf165cfb8bc277bc8a7f46c26f542d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6463
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-24 10:58:48 +00:00
Augustin Cavalier
605bd3f09d termios.h: Undefine/remove some unimplemented BeOS extensions.
We did not ever implement these, it seems, and so they are just
cluttering up the global namespace.

Change-Id: Ib37c3a31663525a18268c9bfe326bfba9afbc794
2023-05-22 18:20:17 -04:00
Trung Nguyen
b809279cd8 kernel/team: Allow retrieving more attributes
- Stored the additional start time of each team, expressed by
milliseconds since boot.
- Added more fields to the `team_info` structure. These field
include those provided by the `get_extended_team_info` syscall as
well as the newly introduced `start_time`.
- Extended the `_kern_get_team_info` system call to receive an
additional `size_t` argument. If this size is smaller than or
equal to the size of the old `team_info` structure, the newly
added attributes will not be retrieved.

Change-Id: I22ee6b91ad2ee3b66a7f770036c79a718c5f115c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6390
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-17 11:07:14 +00:00
David Karoly
84745ade1b kernel/arm/paging: use simplified permission model
Change-Id: Ie0ed357ee9ca5bee4c10c6cbf74eaba77acdd179
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6435
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2023-05-16 18:07:45 +00:00
Trung Nguyen
b197dcbafa tty: Implement exclusive mode
Implemented exclusive mode on Haiku and added the related `ioctl`
operations (`TIOCEXCL` and `TIOCNXCL`).

Change-Id: Iaa201ea20eec0e45d02dd5db9ba6aa35fd27dfb2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6387
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-13 00:41:16 +00:00
Trung Nguyen
d97ad7c4dc termios: New ioctl: TIOCOUTQ
Change-Id: I86f2a7b007137e22cf7d6fc8ad6675ff5de267d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6386
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-11 02:57:36 +00:00
Trung Nguyen
568b8f9395 headers/posix: Add TIOCM_RNG as a synonym for TIOCM_RI
dotnet uses it.

Change-Id: Ie5658263a0fd9c0aa833cc468ddcafe08116a30d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6385
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2023-05-11 02:55:38 +00:00
X512
6550124ea0 riscv64: implement memory barriers
Change-Id: Ied9e6dad38968cee6e828dff6ec413e6281086cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6436
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-10 20:55:18 +00:00
David Karoly
6c58b765f3 kernel/arm: use inline functions for accessing coproc registers
Change-Id: I626ef5722f4ae043de9e8b0c37dbde97ac0513be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6422
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-09 20:50:42 +00:00
David Karoly
c13766fc00 kernel/arm: check for access flag fault in page fault handler
Change-Id: Icc782a692e5dcd861958ffea934386b4d4e569c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6428
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-05-09 20:10:12 +00:00
Augustin Cavalier
0c2a5bb5ea Replace the "tty" driver with a "pty" driver.
This new driver uses the "generic" TTY layer, unlike the old driver
which had its own implementation (which the generic module was derived
from, originally.)

The remaining bits of support for controlling TTYs is added to the kernel &
generic layer at the same time, which should allow for serial interfaces
to be controlling terminals now, as well.

Tested with bash, nano, vim; all seems to still be working as expected.
2023-05-09 16:04:09 -04:00
David Karoly
3d2b8a2045 remove unused header arm920t.h
Change-Id: I288e083857b6da30788be3f902dedd07e3e54d9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6426
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-05-09 18:27:46 +00:00
Alexander von Gluck IV
d9642c25bb headers/os: Bump max gcc to 13.x
* riscv64 builds fine
* x86_64 builds and boots fine

Change-Id: I98b72a9d57b1a6ea0fae5c113a4c24b32fd68a52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6425
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-09 13:58:07 +00:00
Trung Nguyen
f967e2c0c7 headers/bsd: Export pthread_attr_get_np
Exported `pthread_attr_get_np` under `_DEFAULT_SOURCE`. Otherwise,
the presence of this function in `libroot.so` without a definition
would confuse some configuration scripts.

Change-Id: I623ebefc98800e9528dc48859c2aefc828821f27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6383
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-05-08 01:38:41 +00:00
David Karoly
19537d01d1 kernel/arm: adjust function names for getting/setting SCTLR
Change-Id: I28d6101c772a5065beec5af20f6d2a0c1855ae6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6421
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2023-05-07 17:35:21 +00:00
PulkoMandy
d1aa4a4295 Fix typo
Change-Id: I38b5496f8f1afac24e41f3408b10371e932a47f5
2023-04-29 22:46:03 +02:00
PulkoMandy
0ba60bc743 Move BarberPole from HaikuDepot to libshared
I want to use this in at least 2 third-party applications. I think it's
time to make it shared?

Change-Id: I855a59aab4ad6d47d77cf2901cb3dfc34c108059
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6296
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-29 16:11:43 +00:00
Augustin Cavalier
d8e4f52b78 kernel/condition_variable: Add a ConditionVariable::EntriesCount() routine.
Will be useful in changing the XSI subsystems to use condvars.
2023-04-26 17:08:15 -04:00
Augustin Cavalier
557f0446b3 kernel: Introduce THREAD_BLOCK_TYPE_OTHER_OBJECT.
THREAD_BLOCK_TYPE_OTHER implies the "object" pointer in the
wait information is a string. But sometimes we want to pass
through objects which are not strings, for inspection in KDL.
2023-04-26 15:33:53 -04:00
Augustin Cavalier
f5e531e92e kernel/thread_types: Remove Thread::condition_variable_entry.
Unused, and "struct PrivateConditionVariableEntry" no longer exists, anyway.
2023-04-26 15:32:20 -04:00
Máximo Castañeda
e6a598a2f4 ControlLook: fix clipping
Remove ConstrainClippingRegion calls as they do not take into
account view transformations.
Clip drawing to the drawing rect, not the updated area.

Fixes #12890

Change-Id: Ie76cb83e0af03213008da78407de25261daea5df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4457
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-26 10:41:04 +00:00
Augustin Cavalier
69929490eb locale_t.h: Add missing newline at end of file.
Fixes #18369.
2023-04-25 12:38:37 -04:00
Jérôme Duval
bd7bb43761 PCI_x86: remove
Change-Id: I54335b6390dc5e312225a3100fd88d4e49838d35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6331
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-04-25 15:54:32 +00:00
X512
a23ac85fa9 bus_managers/pci: split PCI controller to separate add-on
busses/pci/x86: add
Other add-ons are in following commits.

Change-Id: I7a77bfaef0e8995917b4b54c8369d7075533ec26
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6220
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-04-25 15:54:32 +00:00
X512
97b7c7719d bus_managers/pci: move MSI handling to generic code
Change-Id: I6194838b7b46222f720fc328bb4512fdb88a9c8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6222
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-25 15:54:32 +00:00
X512
e942269a1f pci: generic MSI interrupts support
Change-Id: Ib4fd23f6bca867a2b428bf2651234d719ee08672
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6221
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-04-25 15:54:32 +00:00
wszdexdrf
a2755521d5 Rewrite header ISA.h
partially fixes #1576

Change-Id: I245f55ab466222279e74df7f206a609d3b913ed5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6298
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-04-11 16:32:56 +00:00
Augustin Cavalier
d9e8ef7f66 threads.h: Fix value of ONCE_FLAG_INIT.
Fixes #18348.
2023-04-10 11:50:33 -04:00
Augustin Cavalier
3e1163d6af libroot: Disambiguate parameters of ICUCollateData::Strxfrm.
Same thing that was done for wcsxfrm in 218604196a.
2023-04-08 14:17:15 -04:00
Augustin Cavalier
fcd82d3dc3 math.h: Change definition of FP_ILOGB0 to match the specification.
See #18351 for details on the specifications.

This is the same thing NetBSD does. BeOS R5 defined these values
differently than we did even before this commit, and it does not
seem to have caused problems then, so this should be fine.

While technically an ABI break, in practice these values are not
always differentiated on other platforms, and it appears musl's
code triggers divide-by-zero exceptions on purpose before it
returns this value, anyway.

Fixes #18351.
2023-04-08 12:30:15 -04:00
Augustin Cavalier
0f67b2ac2e uchar.h: Add missing include of stdint.h.
Fixes #17040.
2023-04-08 12:30:14 -04:00
Augustin Cavalier
d0b67fcc80 kernel/util: Clean-ups to DoublyLinkedList insertion routines.
* Make some code common in Insert.

 * Remove unneeded logic from InsertAfter and just call the base Insert.
   InsertBefore does this, already.

 * Synchronize Insert code and APIs in the fs_shell DoublyLinkedList.
2023-04-01 12:31:39 -04:00
Augustin Cavalier
3d3b89c8cc kernel/util: Privatize the deprecated DoublyLinkedList::Insert() variant.
Removing it outright would cause implicit conversions and then the other
variant being called, which would create invalid lists. So make it private
so that any attempts to use it will create errors at compile-time.
2023-04-01 11:34:44 -04:00
Augustin Cavalier
ff6e777d28 kernel/util: Clear list links on removal under KDEBUG.
This way, if someone tries to double-remove an item or do other
invalid things to it, this will crash instead of (silently) corrupting.
2023-03-30 12:46:31 -04:00
Augustin Cavalier
15ff8d64b6 BNetworkDevice: Remove GetNextNetwork.
As far as I can tell, it has no consumers whatsoever outside the tree.
(wpa_supplicant did not even use it.) So, remove it altogether.

If that turns out to be mistaken, we can reinstate it temporarily
as a private class function or ABI-only symbol.
2023-03-29 20:15:32 -04:00
Augustin Cavalier
c650846d9e vm: Replace the VMAreas OpenHashTable with an AVLTree.
Since we used a hash table with a fixed size (1024), collisions were
obviously inevitable, meaning that while insertions would always be
fast, lookups and deletions would take linear time to search the
linked-list for the area in question. For recently-created areas,
this would be fast; for less-recently-created areas, it would get
slower and slower and slower.

A particularly pathological case was the "mmap/24-1" test from the
Open POSIX Testsuite, which creates millions of areas until it hits
ENOMEM; it then simply exits, at which point it would run for minutes
and minutes in the kernel team deletion routines; how long I don't know,
as I rebooted before it finished.

This change fixes that problem, among others, at the cost of increased
area creation time, by using an AVL tree instead of a hash. For comparison,
mmap'ing 2 million areas with the "24-1" test before this change took
around 0m2.706s of real time, while afterwards it takes about 0m3.118s,
or around a 15% increase (1.152x).

On the other hand, the total test runtime for 2 million areas went from
around 2m11.050s to 0m4.035s, or around a 97% decrease (0.031x); in other
words, with this new code, it is *32 times faster.*

Area insertion will no longer be O(1), however, so the time increase
may go up with the number of areas present on the system; but if it's
only around 3 seconds to create 2 million areas, or about 1.56 us per area,
vs. 1.35 us before, I don't think that's worth worrying about.

My nonscientific "compile HaikuDepot with 2 cores in VM" benchmark
seems to be within the realm of "noise", anyway, with most results
both before and after this change coming in around 47s real time.

Change-Id: I230e17de4f80304d082152af83db8bd5abe7b831
2023-03-24 10:53:52 -04:00
David Karoly
60b19d7eac kernel/arm: implement signals, fork, restart syscall
Change-Id: I24219b83d90710ef719190183ba6f069f82dae61
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6198
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-20 17:28:20 +00:00
X512
6d13693a78 kernel/int: increase max interrupt vector count
Change-Id: Ia16e66a7bdac37019e6256405b9f10024909c69a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6215
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-03-20 14:23:54 +00:00
David Karoly
434aab5a4d headers/kernel: remove alpha folder
Change-Id: I057cb53ad68113e9dce2bb13f172d4c3eb1406af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6196
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-12 10:36:01 +00:00
David Karoly
0aeb55c8ac arm: remove unused variables from arch_kernel_args
Change-Id: Ice2be644142b646205648f44fb5bce5e9848e69d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6192
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-11 21:05:49 +00:00
David Karoly
f964790bcc headers/kernel: remove sh4 folder
Change-Id: I71e52b0f4e81c872b9bc14490bf7c38b261120b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6194
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-11 21:05:20 +00:00
Augustin Cavalier
0ecd7516de Package Kit: Use an object_cache in kernel mode for decompression buffers.
The kernel heap only uses object caches for objects up to size 8192.
Larger allocations have to go through the raw allocator. That can
get pretty expensive.

Adding instrumentation around the malloc/free calls in this function
showed that on my machine, some 596ms during boot were spent on
*malloc/free alone*, all else aside. After this change, we are at
around 110ms, or a >5x improvement. Running an fgrep -R on /system/
after boot increased the cumulative time in memory functions to over
5 seconds, while after this change it is "only" 1170ms.

Honestly, it seems like the object depots should be able to be faster
than that, even if this function is called thousands of times. But that
is a problem for a different investigation.

It would be even faster for every consumer of this data in
packagefs just allocated one set of buffers up front, or at least
for a single "read session", but plumbing that all the way
through the myriad abstractions of the Package Kit will
not be easy, and is left for another time, as well.
2023-02-28 13:49:00 -05:00
Augustin Cavalier
79bc16ba6e Rewrite <netdb.h> and drop a lot of non-standard stuff.
While the BSDs and glibc seem to have various _r functions,
they all return int for errors instead of a pointer, making ours
exactly backwards of theirs for error reporting and thus useless.
So, remove them from the header entirely. They are left in
for ABI backwards compatibility for the time being.

A few constants not used by anything in the tree (i.e. not actually
implemented by libnetwork/netresolv) were also dropped. Some deprecated
or non-standard functions were placed behind _DEFAULT_SOURCE or deleted
entirely.

The header itself is now organized approximately as the BSDs do,
although with various Haiku-isms instead of BSD-isms where appropriate.
2023-02-27 22:51:17 -05:00
Augustin Cavalier
6d36f6bfad netdb: Drop definitions for getipnodeby...
We do not actually export them, or even have source for them in-tree.
2023-02-27 21:11:49 -05:00
Augustin Cavalier
36e200e2e0 sys/uio: Add preadv/pwritev.
Fixes #18243.

Change-Id: Ib5867f86100430f5e5c43ce4b2d6d561f546cc1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6068
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-24 16:31:51 +00:00
PulkoMandy
5f88744263 BMenuField: allow to use non-fixed size in combination with layout mode
In fixed size mode, the menu field always uses all the available width.
In non-fixed size mode, the menu field will resize itself to be as small
as possible.

With layout, usually the difference isn't noticeable, since the layout
will already try to resize the control to the smallest possible size.
But there are a few cases where it makes a difference, when the layout
is over-constrained and the menu field can't be made as small as
possible. In that case, the menu field would be forced to fill its
allocated space, where we can instead make it a little smaller.

Change-Id: I911d497218a09aab3824865968558df5d4b3cf98
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6076
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-21 10:47:46 +00:00
PulkoMandy
fc2f1a3247 BMenuField: remove deprecated constructors
These were introduced by mistake during the addition of the layout
system. They have been private since 2011. It seems safe to assume that
nothing uses them anymore and they can now be removed safely.

Change-Id: I98d030096f9cb06fccc25233fe4da17d0213050e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6075
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-18 17:20:27 +00:00
vaibhavg20comp
ba9ce9c13b termios: Added cfsetspeed function.
BSD extension to set both the input and output speed of a termios
structure.

Fixes #18220.

Change-Id: I8c4a06b4be4aa55b8ce35cb7f62552fc47a8e8d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6049
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-02-17 16:16:39 +00:00
Augustin Cavalier
5e9fd9f60d libroot_build & fs_shell: Provide _kern_ functions for readv/writev...
..instead of readv_pos/writev_pos. This way, we can be sure that we
are remapping them properly even under Haiku, as well as remove some
potential confusions.

bfs_shell seems to still work fine on a regular build.
2023-02-14 00:49:52 -05:00
Augustin Cavalier
478c8c847d Drivers.h: Rename device_{read|write}_pages back to device_{read|write}v_hook.
They are not about reading and writing pages, but just iovecs.
As the passed iovecs use void*s, it can't possibly be working with
physical pages on 32-bit systems with PAE.

It appears nothing uses or implements these functions anyway,
as there was nothing else in the tree I had to adjust after making
this change...
2023-02-13 23:05:16 -05:00
David Karoly
125b262675 libroot: introduce crypt_r
Change-Id: Ieacd1b383ac078a440227c7954f5531a36fbbd62
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5827
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-10 18:00:44 +00:00
Dale Cieslak
4f52a155e6 BFont: Minor code cleanup and autolocking for AppFontManager
* changed explicit locking to use Autolocker for gFontManager/fAppFontManager
in ServerApp, per comments in https://review.haiku-os.org/c/haiku/+/4790
* changed BFont::LoadFont (memory version) to use size_t for size and offset
* no functional changes

Change-Id: I438a4975d5bb1b2fa17bc54e9e171c31dadfeec5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6003
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-06 09:21:12 +00:00
Augustin Cavalier
5d41cee816 WeakReferenceable: Clear fUseCount when it is 1.
Otherwise, if there are remaining weak references, they could
potentially try to acquire the object and trigger a use-after-free.
2023-01-31 22:36:59 -05:00
Augustin Cavalier
d891ca1119 headers/build: Drop Drivers.h and Select.h.
As far as I can tell, these are no longer needed after the previous commit;
fs_shell does not reference them, anyway.
2023-01-31 17:15:14 -05:00
Augustin Cavalier
1e860e07ee BPrivate::WeakReferenceable: Move implementation to a .cpp.
No functional change to the implementation, just getting it
out of a header.
2023-01-31 15:36:15 -05:00
PulkoMandy
49efa33dd0 ps2 synaptics: implement 'extended W' mode.
"Newer" synaptics touchpad support a new mode where they can report more
information to the host. In this mode, there is a different packet
format for tracking extra data from the touchpad, including a wheel
encoder (mousewheel) if available, and multitouch finger tracking.

This mode is documented in the Synaptics touchpad interfacing guide
(Synaptics document 511-000275-01 Rev. B), but was not yet implemented
in our driver.

It should help with detecting multiple fingers, or finger position on
clickpads to determine right or left click.

This change implements the following items from the Synaptics
interfacing guide:

- Cleanup and clarify the code for features detection to properly report
  clickpads
- Enable "extended W" mode if supported
- Process extended W values 0 (mouse wheels, reported in the
  touchpad_event structure and could be used by input_server for
  scrolling), 1 (secondary finger), and 2 (finger count)
- Fix handling of wValue, which is not always a finger width
- Add handling of vValuen which indicates the finger width when wValue
  doesn't

Overall, this should provide the movement_maker with a better picture of
what's happening.

Also improve tracing to show received packets and the corresponding
WValue since that's an important value in identifying which type of
packet it is.

Unfortunately I currently don't have a laptop with synaptics touchpad to
test this with.

Change-Id: If334392f4eb2a146955f6c8c897f0ab64d79b8d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4425
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele <nep@packageloss.eu>
2023-01-28 14:57:53 +00:00
Augustin Cavalier
35b40030a7 file_systems/fs_ops_support: Add open_mode_to_access.
This is duplicated across multiple filesystems, and could probably be
used in more still.

Adjusted only BFS, EXT2, and NTFS in this commit, as they are the ones
which make use of fs_ops_support.h already and thus need to be modified
to avoid duplicate-definition errors.

Also tweak next_dirent to support being built under fs_shell.
(Possibly we should define ASSERT there, though?)
2023-01-27 23:53:53 -05:00
Augustin Cavalier
dc95ec5777 file_systems/fs_ops_support: Add comment for next_dirent and mark "inline."
This way, anything which includes the file will not trigger a warning
if it does not use the function.
2023-01-27 23:48:00 -05:00
Pascal Abresch
322be3bee0 StatusView: compute font size based on scrollbar size
Compute a font size that just fits the available space, instead of using
an arbitrary scaling. This makes the code adjust to any font and any UI
size.

Select the appropriate font using a binary search, which will need only
a few attempts (I think 6 font sizes will be tried at the default
config)

Change-Id: Ie3b8678678c0d940981f1785418aa8ab354d01c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3893
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-15 08:45:06 +00:00
Jérôme Duval
37223744b7 kernel/x86: add a hybrid type per cpu, to be dumped when the feature exists.
for AlderLake CPUs

Change-Id: I4beba04e3ac95d7564684ee86de99c894b57a15c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5988
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-01-10 20:40:11 +00:00
X512
f6c51a5dc4 BBitmap: add ability to specify client-defined area
Change-Id: Iae1550b3088b0f6c26b0b91d9acb7f7cbcc721d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4369
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-01-02 18:07:53 +00:00
Oscar Lesta
59b54f3810 poke: use phys_addr_t for mem_map_args's physical_address field
This is needed to fix usage of POKE_GET_PHYSICAL_ADDRESS on
x86 32 bits (with PAE).

Change-Id: Ic00185ec7fcf9b6666ad6169a752d8b8edd2b61b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5975
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-01-02 15:02:32 +00:00
Semion Dimov
d53856a1b6 Added missing posixoptions and sysconf constants according POSIX.1-2017 standard
Change-Id: I2721ea4f2c3dbe0ef6a11c3a61da6034b4a7fd48
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4371
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-23 01:57:05 +00:00
Jérôme Duval
2c08dd5bc5 bus/USB.h: header for usb device items
Change-Id: Ic36733af169948f54d7d938dfab1cb5aeb34ab9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5956
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-12-22 17:43:32 +00:00
Jessica Hamilton
a764093ca8 shared: add ColorItem from Gravity screensaver.
* A useful utility class that will also be used by Terminal later

Change-Id: I23020a401fbab7d4116df31f965ae61ecaf2a6cd
2022-12-22 11:07:28 +13:00
Dale Cieslak
85b82f8524 BFont: allow loading of user fonts from disk or memory
This patch adds an API call to BFont, called LoadFont, that
takes a string path to a font file. The user fonts are managed
via a new class called AppFontManager that inherits from the base
class FontManagerBase but adds the methods to add and remove user
fonts from disk or memory. There is also a new method called UnloadFont
to remove a user font, but on exit of an app all user fonts should be
automatically cleaned up.

Global/system fonts are managed by the GlobalFontManager, which is
a new class that also inherits from the base class FontManagerBase,
replacing the old "FontManager" class.

A maximum of 128 user fonts may be loaded, and memory fonts
may not exceed 20MB.

There's also an overloaded version of LoadFont that accepts
an area_id and loads the font from memory. A size and offset may
optionally be provided to allow for an area that contains more
than just a font.

Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-17 12:32:09 +00:00
Jérôme Duval
76ddb69a3a usb_raw: abort transfers cleanly on kill, fix use-after-free
* aborted transfers will release the notify semaphore when the cancel is notified.
* the allocated buffer would be freed on return, while the usb stack eventually copied
data in the buffer in our back, leading to KDL crashes, because the freed buffer would
be right reallocated for some kernel team structures.
* regression introduced by hrev55806, the transfers didn't need to be cancelled before.

Change-Id: Ifb6e941f71d05c37c36f878059c33883bb72a67c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5905
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-12-14 04:53:09 +00:00
X512
215b685f7f kernel: Drop non-standard GNU inline assignment syntax
* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
  c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff

Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-12-13 20:49:53 +00:00
X512
fa557843f2 riscv: use atomic CSR bit set/clear operations, refactor
Fix race conditions that cause broken timer interrupts.

Change-Id: I78e13a18d394b1566977e894a1def16a66c9ca5f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5883
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-12-11 18:43:15 +00:00
Jérôme Duval
fb69e06195 kernel: load cpu amd microcode update if loaded by the bootloader
we detect basically the cpu info before loading the microcode,
to be able to detect the vendor, and avoid any update on hypervisor.

I couldn't test because my cpu doesn't have any update available.

Change-Id: I6aea830158423b3ee13b640be8a788fc9041e23c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5859
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-30 08:50:59 +00:00
Jérôme Duval
652d5f6347 ccp: driver for the RNG part of CCP on AMD
the entropy source is read every second and pushed to the PRNG.
the PCI device is tested, not the ACPI.

Change-Id: I9bb6b21c7189b28a1d8a624d83b33ff6682152dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5825
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-28 13:33:01 +00:00
Jérôme Duval
3a42882e0f intel_extreme: check another register when finding out hw_cdclk on Haswell/Broadwell
doesn't help with #18084

Change-Id: I6f3cc8b50fc5742fab3021f01b90dfebe484b336
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5830
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-26 12:56:08 +00:00
Jérôme Duval
739d4da07b amd_pstates: introduce a AMD P-states driver for Ryzen with the CPPC feature
tested on Zen2 (Ryzen 3 5300U)
This support was submitted in October for inclusion in Linux.
Haiku supports only two profiles. We could probably add some more, and let the driver says which it supports.

Change-Id: Id7754b445bc32a691d58a1e4af630351562abc22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5826
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-24 06:26:13 +00:00
Jérôme Duval
34e9243872 random: always use the PRNG, and use entropy sources to feed it
remove the yarrow module. the hardware modules can push entropy with queue_randomness().
virtio_rng will now push entropy every 300 seconds.
helps with #14937

Change-Id: If76c5deabf61dc616a0e051332f44b89deb6b8a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5824
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-21 18:28:41 +00:00
Máximo Castañeda
241f109ccb View: provide the transform between different coordinate spaces
There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-13 04:04:30 +00:00
Rudolf Cornelissen
ea959da4df intel gfx: fixed SMAP faults, added 2 G98 IDs to kerneldriver. 2022-11-12 20:16:10 +01:00
PulkoMandy
32a71a00aa stdint.h: fix definition of UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C
C99 chapter 7.18.2, Limits of specified-width integer types:

"This expression shall have the same type as would an expression that is
an object of the corresponding type according to the integer promotions."

C99 chapter 6.3.1.1:

"If an int can represent all values of the original type, the value is
converted to an int; otherwise, it is converted to an unsigned int.
These are called the integer promotions."

Therefore, UINT8_MAX, UINT16_MAX, UINT8_C and UINT16_C should be signed.

This prevents building WebKit with -Werror.

Change-Id: Ib2a2c15acc2c761cccf8caa016c7ff163e3fdc0d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5806
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-08 16:11:40 +00:00
Jérôme Duval
cedd85556c kernel/x86: init the tsc frequency and clock speed from MSR when available
only for AMD newer CPUs. tested on R5300U

Change-Id: I44be2efca37b1738a759a15140e5fd8d3b5ac7b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5804
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-11-07 09:03:52 +00:00
Jérôme Duval
af136a21bd graphics/edid: add support for the CTA extension block
Change-Id: I2799496faf2f9383c703384a419d8d9fcffc75ab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5803
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-07 09:02:42 +00:00
Augustin Cavalier
9fc6234686 Versioning: Add BETA_4 and PRE_BETA_5 version constants.
PRE_BETA_5 is now the default in master.
2022-11-03 20:30:10 -04:00
X512
ede527512e bfs_shell: fix gcc2 build
Fix regression that building Haiku on 32 bit Haiku become not possible.

Change-Id: I527a8c3bc3ad4744d5515a76888d5cac06293cbe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5750
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 16:21:43 +00:00
Jérôme Duval
c95c18768b POSIX: wchar.h and wctype.h don't need the locale.h but locale_t.h
* missed in hrev56270.
* mentioned on IRC: <dwa> please ask them if wchar.h isn't meant to include locale_t.h instead of locale.h

Change-Id: Ia9b7553480430c2fefb4a3659ad525322152582b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5797
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-02 14:09:08 +00:00
Niels Sascha Reedijk
1111dda699 NetServices: Add libnetservices2.a from dev/netservices into master
The overall design does not deviate much from my proof of concept [2] and that still makes a good read to
understanding the overall architecture. If you want to get a sense of how it is built up, the API comes with
full doxygen documentation for the public API [3], and I have also done a PoC change for HaikuDepot which is
useful as an illustration on what the impact for the user of the new library is. [4] There is also a test suite
that may give some insight into the day to day ergonomics of the API [5].

The current state is that I am fairly confident that many HTTP requests will actually work, but I do expect
rough edges with a protocol with this many diverse implementations. There is also a list of features yet to be
implemented on Trac [6]. Additionally, I still want/need to do performance testing.

The goal of merging the kit right now is to start making it available for more uses, and through that also give
a chance to shape its future. There are also some design decisions that need review, most notably I expect some
discussion around the uses of C++ 17 idioms (like std::optional and std::string_view) and around the use of
exceptions for error handling.

The impact of merging right now should be near zero: the netservices2 kit lives in its own header space, and
builds into its own static library (libnetservices2.a). It is not yet used in any of the apps in our
repository.

The branch does remove the deprecated services kit from the libnetapi.so library, though it leaves
libnetservices.a intact. After our previous announcement to remove it after beta 3, this should be expected.

[2] https://github.com/nielx/haiku-netservices-rfc/tree/exceptions
[3] https://git.haiku-os.org/haiku/tree/docs/user/netservices?h=dev/netservices
[4] https://review.haiku-os.org/c/haiku/+/5692
[5] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/netservices2?h=dev/netservices
[6] https://dev.haiku-os.org/wiki/Development/NetServices2

Change-Id: I5d0b7e2619699f39a2506588417b57391f0f5cc2
2022-11-02 01:37:17 +00:00
Augustin Cavalier
8672fc2739 InterfaceDefs: Adjust and introduce new spacing/insets constants.
* Nothing in the tree and few things outside it used BIG_{SPACING|INSETS};
   it seems a value of 15px (at default font size) is not that useful.
   There are, however, a lot of things around the tree that use multiples
   of 20px. So, make BIG be that, with the intent to replace those
   with BIG directly.

 * Introduce CORNER_{SPACING|INSETS}. There are a lot of applications
   (e.g. Tracker, Terminal, Debugger etc.) which use scroll bar width/height
   to metrically align controls with the window frame or with some other
   control which contains scroll bars. Rather than have to invoke
   BScrollBar or BControlLook directly to get the value, we should just
   derive the size of scrollbars from a spacing constant instead
   and get rid of the custom function. (For now it is just replaced.)
   This reuses the old values for BIG, as it is equal to 14px at default.

 * Introduce BORDER_{SPACING|INSETS}. This is equal to the typical border
   size of 1px at default font size (or lower) and uses floor() instead of
   ciel() to compute what the size should be (i.e. it will remain 1px
   at 150%/18pt and only go up at 200%/24pt.) This will allow a lot of
   the hardcoded border sizes around the tree and elsewhere to use
   ComposeSpacing() instead.

Change-Id: Iaea3fa30364859888e816a9d61ac156268d70758
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5702
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: nephele <nep@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-11-02 02:23:32 +00:00
X512
b71020b095 util/DoublyLinkedList: make GetPrevious/GetNext methods static
This methods do not need DoublyLinkedList class state.

sGetLink field that actually implement GetPrevious/GetNext methods is already static.

Change-Id: Ie0b40f7f1b72d640d75403905b8944666874dc87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5796
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 02:12:41 +00:00
Niels Sascha Reedijk
2710b4f5d4 Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I48c8cf4f03e281a5caeb9f27bf052285961529ff
2022-10-29 22:58:24 +01:00
Niels Sascha Reedijk
71e29bbeea NetServices: format code using haiku-format
This commit formats all the netservices2 code with the `haiku-format` tool from
https://github.com/owenca/haiku-format (commit aa7408e), with the following
customizations:
 * SpaceBeforeRangeBasedForLoopColon is set to false
 * Braces before a catch block are not wrapped
 * Most headers, except for ExclusiveBorrow.h, have been manually reformatted
   to adhere to Haiku's header format (issue #19 in the repository)

Change-Id: I693c4515cf26402e48f35d1213ab6d5fcf14bd1e
2022-10-29 22:53:57 +01:00
Augustin Cavalier
b2c77ad27a Network: Add a BNetworkDevice::GetNetworks() method and use it in the GUI.
The GetNextNetwork() method is really inefficient: it fetches all the
networks at once from the kernel every single time and then winds
up returning only one of them. In parts of the GUI that iterate over
all networks more than once per refresh (sometimes within a loop, even!)
this was often a noticeable lag on the GUI, especially with OpenBSD
drivers which have extra overhead to do struct translation in the
ioctl handler.

Now, we have a way to fetch all scan results at once and just iterate
over them as many times as we need, and this is what NetworkStatus
and Network preferences now do, saving lots of time and effort.
2022-10-25 23:34:42 -04:00
Augustin Cavalier
65c155bede BNetworkAddress: Make the first SetToLinkLevel() take a const pointer.
Technically breaks ABI. However to the best of my knowledge,
nothing uses this method outside of the tree.
2022-10-25 23:34:42 -04:00
Alexander von Gluck IV
967cfb4d56 radeon_hd/atombios: Sync up to latest published atombios
Change-Id: Ic0b80da7fb88fabcc1a7e87fb055351a06aa4e68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5528
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-25 22:45:46 +00:00
Han Pengfei
44cceee67e pthread: add pthread_{getname_np,setname_npp}
- These two functions imported for Linux/BSD compability.

Signed-off-by: Han Pengfei <pengphei@qq.com>
Change-Id: I3e9cada26f1ed043bfaed83e8185dcfff3bd71e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5746
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-18 16:30:54 +00:00
Jérôme Duval
8e17b43da6 kernel/device_manager: Implement B_GET_DRIVER_FOR_DEVICE
for legacy and new drivers.

This is an opcode for ioctl that can be used on almost any device entry found in /dev.
When used, ioctl will fill a buffer with the absolute path to the driver file that is
being used by the device.

This opcode was available in BeOS R5, though remained unimplemented in Haiku since
the introduction of the Device Manager almost two decades ago.

Original change by Jacob Secunda.

Change-Id: Ic49141b677b4158a63918459d4048450c825447c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5078
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-10-17 06:13:07 +00:00
Axel Dörfler
97739603d1 kernel: Added operator delete(ptr, nothrow_t)
* This seems to be required when building the DriveEncryption kernel
  driver with gcc 11.2 on x86-64, at least.

Change-Id: Ie1ae09435dd912021957e64d4b9a3e7b05913c33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5742
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-10-12 20:35:55 +00:00
Jérôme Duval
edeaa9c0c7 listusb: generate class code table from usb.ids, and use it
Change-Id: I43b79c5abc74306aba9a69991aeb5e110b2d790b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5737
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-10-10 21:28:37 +00:00
Jérôme Duval
e065d697fb Disk Device Manager: checks the raw content_name when editing a partition
also only provide a default name for partition containing a file system
fix #17958

Change-Id: Ib5a8928dc5272a400a99aa05b792201f3a6a2c7d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5705
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-30 17:10:39 +00:00
Augustin Cavalier
78ee50a272 InterfaceDefs: Specify INSETS constants in terms of SPACING constants.
They already used the same numeric values. Also reorder for consistency.
No functional change.
2022-09-28 19:47:38 -04:00
Augustin Cavalier
e285b3071d Introduce a utility function for moving to the next dirent in read_dir.
This takes care of making sure the dirent buffer is properly aligned,
which it needs to be on some platforms (SPARC, ARM, etc.)

Change-Id: I9a6352b1e654c090a200770d51f96511ee024a99
2022-09-28 16:30:00 -04:00
Jérôme Duval
fbca1c4088 kernel/x86_64: configure LFENCE as a serializing instruction on AMD
Change-Id: I152bf41c3479f81fc458abdf8d89874ffa3a08d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5691
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-25 08:15:15 +00:00