This paves the way for a variety of more interesting interactions
between drivers and the stack which are currently not possible
(e.g. checksum offload, #18744). The main advantage for the moment
is that we will save a memcpy of the buffer on each send/receive.
Adapt the virtio_net driver so that at least one driver is using
the new interface. Network still seems to work OK with it.
Change-Id: Ic5832e4865e3e1bed7462583ca1ffd16418d7cab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7912
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Does not actually break ABI since net_buffer had 3 bytes of padding
remaining unused.
Add the first two constants for this field: L3/L4_CHECKSUM_VALID.
These will indicate when the checksum of the packet is known to be
valid (good/correct).
Change-Id: I155b3ea51d1093e229677cb788a007560ddbd428
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7916
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
It contains only the MSG_* flags, not any other kind of flags.
Change-Id: Ia4590d87a1638fcdb848ef2b816b047b72ca2836
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7915
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>
Convert users of those and other parameters to the new API.
Fix mouse preferences "Default" button not changing button map.
Change-Id: I9184011fd3067fd0b229e1db6376c1b41f06dab9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7878
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Remove compatibility with legacy settings format.
The preferences app doesn't need to read and save the settings file:
devices are enumerated and their properties retrieved from the
input_server. When something changes, the input_server updates the data.
Change-Id: Id1ea6f2532a1c8a173e9ba9818dd911fd6f4aa10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7877
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Every time a page is mapped into an area on fault, we have to
allocate a mapping object for it. While the object_cache
does have per-CPU depots, these depots only store a limited
number of items, and once they run out the object_cache's lock
must be acquired.
So, to reduce lock contention on SMP systems, create a number
of object caches corresponding to the nearest power of 2
that is equal or smaller than the count of CPUs. (We already
allocate dozens of object caches for the block allocator
no matter how many CPUs there are, so a few more depending
on CPU count shouldn't impact memory use too much. Besides,
the object_caches are wired into the low_resource system.)
This significantly reduces lock contention on SMP systems.
Same benchmark setup as yesterday (compile mime_db and relink
HaikuDepot, VMware, -j4), before:
real 0m16.981s
user 0m14.357s
sys 0m6.060s
after:
real 0m14.522s
user 0m14.194s
sys 0m4.337s
And the page_mappings object_cache locks went from having 200,000+ waits
and ~14 seconds waiting time (across all threads) down to ~900 (yes,
that's not a typo) and ~0.05s wait time (though these numbers were captured
in conjunction with the following commit.)
This is an alternative to DT_HASH (SystemV/SVR4 hash tables.) Notably,
it uses a Bloom filter to allow an entire image to be skipped
at once rather than searching the actual symbol hash.
We don't currently build anything with DT_GNU_HASH support.
You can test this by adding -Wl,--hash-style=both to HAIKU_LINKFLAGS.
(It seems to increase image sizes by not too much: libroot goes
from 1347139 to 1367691 bytes (20.55 KB) in my build.)
Change-Id: I4a91276490fcd136db175833ee48b36e06ceed47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7855
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Put close/free at the beginning since all FDs must implement that.
(Most of the function declarations inline were already in this order.)
* Add readv/writev hooks. Not used yet, but this will allow for
more than just files to implement them. All declarations updated
to have NULL for the hooks for the moment.
It allows introducing new file descriptor types without editing enumeration every time. Anonymous FDs will be needed for Mesa
OpenGL/Vulkan drivers to reference GPU memory buffers and other driver objects that can be referenced as FDs from userland.
This change breaks private VFS API compatibility.
No behavior changes intended.
Change-Id: Iac109aad420b0b6aae704b38619436e01dcf4969
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7838
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This only happens on team exit and exec. In the exec case, we can
just document that this implies all images are removed from the team.
It appears all consumers of the debugger API handle this correctly as-is.
Instead of taking the sample inside the timer callback
or the flush callback depending, always take it in the timer
callback, for consistency's sake. This should always work
because we try to flush the buffer when it's only 70% full;
in testing I can't recall seeing any dropped ticks.
Also add a flush call in the post_syscall hook, in case
we hit the flush threshhold while profiling in the kernel
and couldn't trigger the flush then.
Seems to significantly reduce "missed" ticks overall,
but there are still wildly inconsistent results and
lots of missing time.
Change-Id: I43a5e9c050a50309329da39f8a2386c3e2b3c0dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7851
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
switch credits in AboutSystem from udis86 to zydis
Change-Id: I03a7965a272c50714df9726e53c7d4067d8f1925
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7850
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* for GCC2 build with a modern GCC as suggested by waddlesplash
* make the headers compatible with GCC2
Change-Id: Ice74eeddbe10bc8f9cf9ae90baa833a46bb3c676
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7848
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* udis86 isn't updated since 2014. New SIMD opcodes are missing.
Thus replaces udis86 with Zydis, which is actively developed and used in
Webkit, SpiderMonkey. It is under MIT license.
* encoder code is removed
Change-Id: Ieae7e829e186ce7d4a6df640c62561ad220858fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7847
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The "-k" argument (which never did anything before) is now inverted
compared to what it used to be, i.e. now specifying it will profile
kernel frames, too, whereas by default only user frames will be
sampled.
This also corrects an oversight in pthread_join() that not all
potential error codes of wait_for_thread were accounted for
(in particular EDEADLK wasn't.)
This is a non-standard extension, but is present on both Linux
and FreeBSD, at least.
Change-Id: Ie96e7a261e863ab491bee30349360df7ff3d0e80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5099
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* B_ABSOLUTE_REAL_TIME_TIMEOUT is used for kernel timers, and
must be used for absolute timeout values, rather than the
B_ABSOLUTE_TIMEOUT flag. Discovered whilst implementing
`pthread_timedjoin_np`.
Change-Id: I37ae057073ff5efeecc00406b132abf51bebbdc2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5100
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This shows that the profiler is still pretty broken, because we
are missing quite a lot of ticks on average. One run of
"profile pkgman search" here produced an output with 66 total ticks
and 423 (!) missed ticks. A brief run of WebPositive was not quite
as bad (main thread: 1078 total ticks, 157 missed ticks.)
Change-Id: Idfc34534e66eff0fe7e948fcc3576be09db879a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7820
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Without this, a query term that does have an index but for which
the pattern starts with a wildcard (e.g. "*term*") is treated as having
a score of 0. That means that it is then dependent on the query order
as to whether or not the equation will run at all, since if all the terms
have a score of 0 but one has an index, placing that term first
will make the query run while any other would not.
Fixes #18672.
If we have a matching operator, we will replace the current item
with a new item, and we may need to process it again. For example,
in cases like "A||B||C", the first pass will turn this into "(A||B)||C",
and so we need to re-process the first item to get "((A||B)||C".
Fixes "Open with..." and some other things following the query parser
refactorings.
This way, we won't run into stack overflow issues due to recursion.
Who would really need a FS query with more than 32 equations, anyway?
Fixes #18692.
Change-Id: Ieda401446d9cae2e56100ddbab08bebcc724b484
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7789
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
This way, we can handle parse trees of arbitrary depth without
running into stack overflows. Of course, evaluation is still
a problem...
While at it, use "const char*" everywhere, and also put the
query parser into an Init() function so we can return
more statuses than just B_BAD_VALUE.
Part of #18692.
Change-Id: Ib81e6545935ce484df10dfe36ca4ffcf2b3cd607
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7710
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Should not result in functional changes to packagefs and ramfs
queries behavior.
Change-Id: If361ca65de99d255e67f929c3442e0c20e39cdf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7703
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Adds a `signal` field to the `team_deleted` event. Since killing
signals like `SIGKILL` and `SIGKILLTHR` do not generate a
`signal_received` event, debuggers would only see a `team_deleted`
message with the `status` field set to 0. This makes debuggers like
GDB think that the debuggee has exited with a status code of 0.
To correctly report these signals, when a killing signal is sent
to a team, this signal is relayed to the main thread instead of
defaulting to just a `SIGKILLTHR` for both cases.
Change-Id: If69c9e2e4d87bfbd31f654f5cb6f696ac69ef777
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7756
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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>
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>
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>
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>
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>
* like sigqueue() but for threads. was added recently to FreeBSD, long before to glibc.
* also include features.h in gnu/pthread.h
Change-Id: I73bca666e2c67d7ff05f341bf85d71df9ccccbe5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7659
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(And surrounding portions of the "btCoreData" module.)
* Rewrote the main "l2cap.h" header representing protocol constants
and structures. Now conforms to general Haiku naming conventions
rather than BSD ones. Some more constants added/removed based
on the most recent Bluetooth specification.
* Rewrote all code derived from the BSDs to match Haiku conventions
and structures in the driver.
* Dropped the "channel" and "frame" structures from "btCoreData".
Channels are now managed by L2capEndpoints, and "frames" are
now just plain net_buffers without surrounding structures.
This also makes state management much simpler.
* Made it so that actual net_buffers are passed through to the
l2cap_receive function rather than another data structure.
A fake interface address is used to communicate connection
information. (This probably ought to be changed, though.)
* Get rid of l2cap_lower and l2cap_upper abstractions.
Everything related to channel/endpoint management is now
done in L2capEndpoint, while buffer reception is handled
directly in l2cap_receive and elsewhere, same as other drivers.
* Wire up more hooks and fix module flags (needed to be able to
get the module loaded and opening sockets at all.)
* Implement an actual locking strategy in L2capEndpoint
and HciConnection. There's still problems with lifetime
management, but at least thread-safety is mostly handled.
* Create an L2capEndpointManager and use it to manage
the endpoints, rather than having a single (unsafe)
linked-list.
And plenty of other refactorings and cleanups besides.
There's still more to be done for Bluetooth overall, though:
* The "btCoreData" and "hci" modules also badly need a major
overhaul, and should be merged into a single "bluetooth"
bus_manager. They also shouldn't be passing around pointers
to other modules like this.
* There's a number of TODOs/FIXMEs in the L2CAP module, most
notably around timeouts (especially command timeouts) and
parameter validation/specification.
Tested by myself with kallisti5's help. Incoming connections
(on the PSM for SDP) get all the way to the latter half
of the Configuration step before hanging.
Needed for the echo indigo soundcard driver build.
IRQ is used as a field name in pmcia/cs.h. The IRQ() macro should only
be used with parameters. So we can avoid the use of IRQ in cs.h being
accidentally replaced by the macro.
Change-Id: Ib10f3c5148cfb7c87a0b258a95a590778b6e5cb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7608
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
In the new "automatic" mode, the number of displayed colors
is just 3, as opposed to the full 38. Much more manageable!
The HSL routines added in this commit were derived from
https://gist.github.com/ciembor/1494530 which is itself derived
from the Wikipedia page describing HSL/HSV.
Part of #15543 and #11636.
Change-Id: I230a358d18c379fb0673162e0b3cbdb8d1b8d84e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7479
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit in no form is intended to provide a working/functional
driver, but rather as a starting base and minimal code contribution
for GSoC.
This driver can only identify if the current device is a Sound
VirtIO device.
Change-Id: I718bb87c768dd84ff2be77a14e839f94955671fc
Signed-off-by: Diego Roux <diegoroux04@protonmail.com>
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7557
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Use BDateTimeFormat, BDateFormat, and BNumberFormat for
various date, time, decimal, and percent formatting.
Change-Id: I994563d207db8bd28342ca6543b69a356ced38af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7505
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Otherwise we could cause leaks.
Most of the time this check should be optimized out,
as most uses of AutoDeleter don't invoke SetTo. But
it would have caught some bugs in the VFS refactors
(which wound up being cancelled out by later commits
anyway, but this would've exposed them.)
Just invoke debugger(), which calls the kernel
debugger when compiled in kernel mode. And define
debugger() inline in this header if OS.h is not
included to avoid namespace pollution.
Noticed by Joachim Mairböck after I hastily merged change 7402.
Also add named variation instance selection for fonts loaded from memory
areas like there already is for files.
Change-Id: I76de22181dc39559956c25987165be2f8a8c4a37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7493
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
It's not used for anything by the OS but userspace might want
to use it for its own purposes.
Change-Id: Icda4bcd6de9d68596555e81293c8bd075f80a2a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7511
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This is no-op for 32 bit platforms because `int32` is defined as `long` there.
Change interrupt vector number from 64 bits to 32 bits for 64 bit platforms.
Change-Id: I52d1ad616cab16488804e9733c7afaf772a670ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7507
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
BFont::LoadFont can now use an index (0-based) and an optional named-instance (1-based)
to select the font variant from a file.
BFont::LoadFont can also use an index when loading from memory.
Change-Id: I0ce3eb6cc77d32cf43847416561eafe3063ca693
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7402
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Also increase MSI message data size to 32 bits according to PCIe spec.
Remove 0xff check for MSI interrupts because it is potentially valid
interrupt vector number. Reject 0xff only for legacy pin interrupts.
- MSI-X supports up to 2048 interrupts per device that do not fit to
`uint8`.
- Non-x86 systems may use separate interrupt vector ranges for
hard-wired interrupts and MSI interrupts so `uint8` is not enough to
represent all of them.
Change-Id: Iaf9ffb197ec23db0f97ffe3ea756d28d7bfc8705
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7433
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
BSpinner had its own fValue defined instead of using the one from
BControl. This results in the be:value in the message sent when the
control is invoked to always be 0.
Change-Id: I1cff5f30adbf5b1dede57a14377cd4e1db7a30d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7428
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* our ip modules don't support connect()/send(). Just use sendto().
* ping6 disappears, ping supports -4 or -6 to force IPv4 or IPv6
Change-Id: I1e982e354cc75d3a314c5bbbfffa0373e8f4d9af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7427
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Change the value of `AT_FDCWD` from -1 to -100. Either value should work,
since the Haiku implementation currently interprets any negative value as
`AT_FDCWD`, however -100 is preferable to -1 since -1 is used for error
return values.
fixes #18809
Change-Id: I53f273dd595c39ea9e4576b90adbbf7f555107cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7423
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The `enum` containing `B_USE_DEFAULT_SPACING` and other members are
regularly used in default arguments.
Adding the name to this `enum` makes the header more generator-friendly
(see #6716).
Change-Id: I6676d2329bdb2152ccb37615345b97ba35f70563
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7377
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
ItemUnderAt was returning items that were not under the superitem (this
was fixed for EachItemUnder in hrev52210).
Make a NULL superitem mean the parent of the topmost items. Despite not
being explicitly documented in the BeBook, that's how BeOS works, the
MenuWorld test app uses it and, well, it's handy.
Change-Id: I2551e8ce874a6238c5e5fb1eb742e68e62d3928a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7359
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Adds headers that have not been directly or indirectly included by
the "InterfaceKit.h" master include.
Change-Id: Id163e0e8db54bc553593819801e0e854cde78fa3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7376
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
by default, AdapterIO is initialized with a BMallocIO object, which will
be extended indefinitely. Flushing regularly is necessary to avoid
excessive memory usage. Tested in StreamRadio.
Change-Id: I9f3142c0a2300ad44dc54ccf6932d41c9526320b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7302
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
sample for qemu: -device virtio-vga,edid=on,xres=1024,yres=768 -display sdl
display mode can be set in the Screen preferences.
Change-Id: If1d6aeecb208ce7c62c42eea1a95c71237c4375a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7038
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Also use the standard kernel-wide constants for IO or memory space
rather than defining new ones, as well as the PCI constants for
address types.
Change-Id: Iad03f7666ad5121a5c9a398339aa1a191339a1d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7336
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
some laptops decide to not charge a fast full battery to not consume a cycle.
In this discharging state, the current rate is zero, thus no time left can be computed.
We add a state "Not charging" to clearly differentiate and avoid user confusion.
PowerStatus was triggering low battery notifications, this is also fixed.
Change-Id: I4745c78eb0863ab01fe34cb065707d068cff0f0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7300
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
In our C library we try to provide a "clean" POSIX/ISO-C set of include
files that strictly conforming applications can use. However, we also
want to provide some extensions that are commonly available in BSD or
GNU systems.
These are normally provided in a separate directory
(headers/compatibility/bsd) and additionally guarded by compiler defines
that can either be explicitly set, or enabled by default if the language
standard (selected from the compiler command line) is one with GNU
extensions (this is the default for GCC). This is controlled by a header
file called features.h.
However, for some headers it is not so simple to split the GNU
extensions apart from the other parts of the file, because it's not just
extra functions, but additional flags and defines.
So, we need the "features.h" mechanism to be available even in the base
set of headers, but not enable anything if the BSD headers are not in
the search path. The simplest way to achieve this is to have an empty
features.h in the base set of headers, that can then be overriden by the
one in headers/compatibility/bsd if needed.
Fixes #18732
Change-Id: Ia54d1206c2fba378ae276ed4232aee8443180afb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7287
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This file was imported from glibx and uses __USE_GNU as defined by
glibc(s features.h. Our implementation of features.h is simpler, just
defining _DEFAULT_SOURCE directly and that's what we use in other
headers.
As a result, using GNU extensions to regex.h required defining __USE_GNU
directly in applications (for example in TraX).
Fixes #11818
Change-Id: I11e4cf2e88c330cf58083852c4b33aedb8a3a9ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7238
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
After this change `POKE_UNMAP_MEMORY` ioctl will became redurant and
an alias for `delete_area()`. Areas will be automatically deleted
on team exit.
Change-Id: I336b49c2281abf064e1bf28d908c7b2c5afd4df0
Multi-select lists may also auto-scroll on drag now as well.
Document ScrollTo(index). Give Scrolling its own section.
Change-Id: I36284a28376a01bafd23ddb30162fc786fb41521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7213
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
means B_DEVICE_TYPE, B_DEVICE_SUB_TYPE, B_DEVICE_INTERFACE.
_CLS is rare, it means I don't own devices with this attribute.
from the spec: _CLS:
Class Code – supplies OSPM with the PCI-defined class, subclass and programming interface for a device. Optional.
Change-Id: I4f7b7ed66cbe6b4ff4511cb13df2af218350a5d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7210
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
We already use their value, let's use the name too.
Change-Id: I5afbd69923ae3b5e702dfb935a709c3069de5365
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7146
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: François Revol <revol@free.fr>
private convenience methods to calculate the text view width and
height with insets and the text rect width and height without
insets respectively.
Also add _ViewRect() and _TextRect() methods for completeness,
but they are not currently used.
Change-Id: I0582bc93a0a3a6820bbb2262a1d726457309ab9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7162
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
A version of this feature was originally implemented in hrev50495
that allowed you to scroll through a list of list items while the
mouse was held down updating the selection as you went.
This feature was removed when we switched to selecting on mouse up
in hrev52062 and was never reimplimented when we switched back to
selecting on mouse down in hrev52121.
In BeOS R5 as you scrolled through a single-selection list with the
mouse button held down the selected item appeared to change, but
the selection didn't actually update until you released the mouse
button. The selection never changes on mouse down, only on mouse
up. You could click on one item then move your mouse off the first
item to a second item releasing your mouse button and it would
select the second item without ever selecting the first item.
In this commit we replicate this behavior with one exception, we
always select on mouse down, but still allow the selection to
change on mouse up.
The big difference between this and the BeOS behavior is that on
BeOS you could only select exactly one item on mouse up, while with
this you can select one item on mouse down and a second item on
mouse up.
ScrollToSelection() in MouseMoved() if mouse button is down and
we are not not dragging. This performs auto-scroll.
Create private _DoSelection() method copied from MouseDown().
Remove Thread.h include that is no longer used.
Fixes #15009 (and doesn't cause regression for #9190#14264#14289)
Change-Id: Icae02b8d37ed281390647504b4efa3d694ea522a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1956
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Rename the "tun" network device to "tunnel". FreeBSD calls theirs
"tuntap" but speaks of both TUN and TAP devices as interfaces for
tunnels. The other BSDs seem to do likewise.
* Fold the "tun" driver into the "tunnel" network device. The
network device now publishes entries in devfs when interfaces
are created, and unpublishes them when interfaces are destroyed.
This removes the need for the driver and device to communicate
through a file descriptor, and thus allows the receive queue
to be totally eliminated, massively simplifying that logic.
* Use standard net-stack FIFOs instead of TCP BufferQueue, which is
specialized to TCP's needs in far too many ways. Thanks to the
previous commit adding support for interrupting semaphore waits,
we can use the FIFO wait mechanisms, too.
* Restructure the TAP logic, and generate MAC addresses more like
Linux does.
* Actually set type = IFT_TUN, and use the "loopback" frame handler
instead of the "ethernet" frame handler. This allows significant
cleanup of the header handling logic.
* In TUN mode, reject packets that don't look like IP packets.
* Delete "tunconfig"; it was mostly stubs and is now unnecessary.
TUN mode tested and confirmed as working by kallisti5 with OpenVPN.
TAP mode partially tested, but not yet confirmed as working.
Fixes #18673.
Change-Id: Ibd803139474e8db556a4f567901da15ee4083621
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7143
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
These have not been used in years (maybe since the redesign of the
network stack?). Only socket_writev had an implementation, which was
mostly just an incomplete version of socket_send.
Scatter/gather I/O is already supported via msghdr's msg_iov/len fields,
so this is redundant anyway.
Change-Id: If41c4f4ee021856f6db49c7cb95422a9c1aa7700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7127
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
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>
Change-Id: Idf7ab6d2aa2b4f8cb4893053b531d2eae7418427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6608
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Improve the mechanics for JSON parsing by reusing
text buffers during the parse.
Change-Id: I7fb2cae31e6558a5a0c63fd02e1fc6fec4f9e4b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7106
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
after a0131eaae2 mxcsr was possibly also incorrect.
fpu control and mxcsr will be restored with fxrstor/xrstor.
no need to clear pending exceptions on #MF
fix #18656 (and #18624 after reverting).
Change-Id: I7dd5e2e4610747c5b82abd6c67e302d264b4be92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7104
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* also on x86 for simplicity.
* fixes #18624
* also makes x87 FPU data registers available for x87 floating instructions. EMMS is cheap.
see 25209d81f7
Change-Id: I5c1b399377102f3eb10bc6d7f7247afbaf6d8483
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7089
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Declare databridge buffer lengths in LocaleBackend.
* Use strcpy instead of strlcpy when writing to databridge buffers
(this is the first fix for #18598.)
* Check for overflows and error out when they happen.
* Verify that ICU actually knows the timezone in question
and fall back to GMT if it does not (this would also fix that crash.)
Fixes #18598.
While debugging some problems on the HaikuPorts build VMs, mmlr
noticed their clocks had an alarming amount of drift. This prompted
an investigation into TSC calibration mechanisms, and the discovery
that there is a VM-specific one which we did not implement.
This mechanism is more accurate than counting cycles on VMs where
cycles can be "stolen" (the probable cause of the aforementioned
clock drift.)
Tested in VMware (works out of the box) and on QEMU/KVM
(may need TSC frequency specified or a host with invariant TSC.)
Change-Id: I4ccfdb2e4e2621404ec9026e7106c02bf96faf18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7063
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Solves a few "Unknown connector" errors on newer cards.
* It's just another physical name for DisplayPort
Change-Id: I37a6f1bb1db66279b305bdbce3c200612eac1130
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7042
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This undoes fc7864091e.
It was only ever used by the FreeBSD compatibility layer,
only supported one structure, and created problems with
concurrent builds.
Fixes some PTE concurrent access bugs.
Change-Id: I09ec56861fae389a8a3e228b17a3921b85202c8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6949
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Attribute is ignored for now.
It is supposed to check ABI compatiblity and reject loading incompatible images.
Haiku currently do not use multiple ABIs for RISC-V so it is safe to ignore attributes.
PT_RISCV_ATTRIBUTES program header is produced by default in GCC 13 and Clang 17.
Change-Id: I4659e9bacbf34a2a0bc16b34c2aaa37232d700fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6948
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
This switches the application over from using basic
authentication to using token-based authentication in
preparation for later using Open-ID based
authentication flows. The application version is also
bumped in order that the server can detect this version
at some later date in the future when it no longer
supports basic authentication itself.
Change-Id: I7addde1d57503c58d6bcd54908f22f66830c0c59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6944
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Replace count_low/count_high with bigtime_t fields plus an int32.
sizeof(spinlock) is now 32 bytes with the debug option enabled.
* Adjust and clean up all spinlock code to use the new fields.
* Fold DEBUG_SPINLOCK_LATENCIES into the new code. Remove the bootloader
option and other flags for it (these were not compiled in by default.)
The new code should be much easier to understand and also more powerful.
However, the information transmitted to userland isn't as useful now;
the KDL command output will have the interesting information.
(Things could be reworked to transmit more interesting information to
userland again if desired, but as this code clearly hadn't been compiled
for many years, as it referred to global spinlocks that have been gone
for a very long time.)
Change-Id: I2cb34078bfdc7604f288a297b6cd1aa7ff9cc512
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6943
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Only the x86 and PPC implementations look like they would have worked,
while the builtin is available and will work across all architectures.
We already use it unconditionally in some parts of libroot.
Change-Id: I2dffb3b2c7cdd605092382b9d649151adb921bb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6942
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Our features.h does not define __USE_GNU, and so applications trying
to use this GNU-ism would have to define it for themselves, even if
_GNU_SOURCE had already been specified.
BSlowContextPopup was mostly a duplicate class of BNavMenu
only on top of BPopUpMenu instead of BMenu. Now, BPopUpNavMenu
just subclasses BNavMenu and adds the few features of BPopUpMenu
neccessary.
Drag-and-drop of files using the pop-up nav menu seems to still work fine.
Change-Id: Ic1f49c5bed60fff7a3076a22f74aebc6eba51d57
As part of adding perspective transformations, agg_trans_perspective.h
was patched to fix a multiple definitions error. This change has been
submitted for review to the "upstream" repositories at [1], [2],
and [3].
Also includes various other improvements such as VertexSource being
split into its own file, code style improvements, and documentation
improvements.
[1] https://sourceforge.net/p/agg/patches/6/
[2] https://github.com/ghaerr/agg-2.6/pull/9
[3] https://github.com/aggeom/agg-2.6/pull/7
Change-Id: I4bffd2f87354bde10155e23145a232a925be6ff3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6801
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The new version has many more features than the old one. This update
is necessary for an upcoming update to Icon-O-Matic adding perspective
transformers.
This update is pulled from https://github.com/ghaerr/agg-2.6 at commit
e7db22bd12700118257b4cb780539c421e01aa51 with our changes applied on
top. Note that this repository isn't necessarily the chosen upstream
that all future updates should be pulled from. See the discussion
starting at [1] for more information.
This also updates the affine transformation since the newer perspective
transformation requires the newer version.
[1] https://discuss.haiku-os.org/t/gsoc-2023-progress-on-perspective-transformation-haiku-project/13594/34
Change-Id: Ic578eec15fbb9131338b3c605c737ce1bfb252ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6808
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
on x86_64 implemented with rdtscp or rdpid, generically with a syscall.
Change-Id: I8f776848bf35575abec8a8c612c4a25d8550daea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6866
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Implemented `UnixBufferQueue::SetCapacity` so that `setsockopt`
with `SO_RCVBUF` will not always return an error.
Change-Id: I2d9be84633f84474fac64b379e9f89ef2751a094
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6816
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Check fFirst/fLast instead of previous/next. Avoids
list corruption when trying to remove already-removed
elements, instead will cause null-dereference KDL.
* Always set next/previous to NULL even when DEBUG is not
enabled.
It only supports file descriptors and processes (threads),
and a few flags (not all) to go with them.
This has been tested extensively against libuv.
Change-Id: I6fc5930fa7273698172c9c695965842b5df44f03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6746
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Based on hamishm's original patch from 2015, but heavily modified,
refactored, and reworked.
From the original commit message:
> When an object is deleted, a B_EVENT_INVALID event is delivered,
> and the object is unregistered from the queue.
>
> The special event flag B_EVENT_ONE_SHOT can be passed in when adding
> an object so that the object is automatically unregistered when an
> event is delivered.
Modifications to the original change include:
* Removed the public interface (syscalls remain private for the moment)
* Event list queueing/dequeueing almost entirely rewritten, including:
- Clear events field when dequeueing.
- Have B_EVENT_QUEUED actually indicate whether the event has been
appended to the linked list (or not), based around lock state.
The previous logic was prone to races and double-insertions.
- "Modify" is now just "Deselect + Select" performed at once;
previously it could cause use-after-frees.
- Unlock for deselect only once at the end of dequeue.
- Handle INVALID events still in the queue upon destruction,
fixing memory leaks.
* Deduplified code with wait_for_objects.
* Use of C++ virtual dispatch instead of C-style enum + function calls,
and BReferenceable plus destructors for teardown.
* Removed select/modify/delete flags. Select/Modify are now the same
operation on the syscall interface, and "Delete" is done when 0
is passed for "events". Additionally, the events selected can be fetched
by passing -1 for "events".
* Implemented level-triggered mode.
* Use of BStackOrHeapArray and other convenience routines in syscalls.
Change-Id: I1d2f094fd981c95215a59adbc087523c7bbbe40b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6745
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Explicitly hide some BAlert functions that ought to have been
deleted. This prevents binding generators from thinking that these
functions are available, causing undefined symbol errors during
link time.
Change-Id: I56f53808851b82a10f31015d2351d4e2c29b6f33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6718
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
ASID allocation is not supported yet, so always use ASID 0 for user pages for now.
Change-Id: I021e77dae692c22984bc625dd0588362bece45b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6698
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Make Haiku headers a bit more friendly to binding generators by:
- Giving some `enum`s names (especially those that appear in
default arguments).
- Converting an internal `inline` function into a macro so that
the result could be evaluated in compile time.
Change-Id: I770674ad8fa7b24ac30b6b447d52a4b4c2530b8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6716
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
gcc 13 is confused by the custom bitset implementation, so use the C++
standard one instead.
However, this results in including the C++ <string> header in kernel
code. This doesn't work for gcc2, because of two problems:
- That header includes a declaration of atomic_add that doesn't match
the one in SupportsDefs.h (which can in some cases replace the function
with a #define for an inline version). Adjust the header to use the
be a problem because it creates a risk of circular inclusions.
Standard C++ headers shouldn't depend on BeAPI ones.
- It also leads to the inclusion of iostream which defined lock and
unlock functions in the global namespace. We don't want these, and they
are not part of the C++ standard, so just remove them.
Ideally we could use std::hash for the GetHashCode implementation, but
that doesn't work because it depends on an helper function that's in
libstdc++, and we can't link that from kernel add-ons.
Change-Id: Iee07280beb4dddf7a9b6160e37f3b816e4de89ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6663
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Previously this just turned the rw_lock into the equivalent of a
recursive_lock, which meant that reader vs. writer assertions
were of no use.
Now, we have a per-thread static array which stores the held read
locks, allowing ASSERT_READ_LOCKED_RW_LOCK to work properly,
and allowing multiple readers to be active at a time.
This probably should still remain disabled even on nightly builds,
but at least it's much more useful as a debugging tool than it was
beforehand.
Change-Id: I386b2bc2ada8df42f4ab11a05563ef22af58e77f
GCC 13 is more strict about what C++ features are available in a freestanding
(= build without standard library) build. The `stdlib.h` and `math.h` headers
are redefined as part of libstdc++. If the object is built as freestanding, it
should be assumed that none of the standard library functions are available.
The solution in Haiku has been to add part of the standard library into the
kernel shared object. The method of exposing them has been to allow the
use of `stdlib.h` and `math.h` in the kernel and in kernel add-ons.
This change allows that approach to continue. What it does, is that it defines
specific headers which will be picked up when a module is built using private
kernel headers. When building for the kernel (or for the boot module), it will
bypass GCC 13's libstdc++ default behaviour of not including the POSIX/platform
header with all the function definitions.
An alternative to be considered for the longer term is to specifically define
the parts of the C/C++ standard library that is available in the kernel in
these headers, or create custom headers when building kernel modules (which is
how Linux approaches it).
Change-Id: Icab4614f642219fa77732b02401570708ee9a963
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6645
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
- Resize the `page_protections` array in `cut_area` and also shift
the bits if necessary.
- Set the correct protection array as well as the real page
protections for the second area produced by `cut_area`.
Change-Id: I62293480487e869420ebe5a3bc729cec2a14c687
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6395
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This requires the introduction of the flag B_USER_MUTEX_SHARED, and then
actually using the SHARED flags in pthread structures to determine when
it should be passed through.
This commit still uses wired memory even for per-team contexts.
That will change in the next commit.
GLTeapot FPS seems about the same.
Change-Id: I749a00dcea1531e113a65299b6d6610f57511fcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6602
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Introduce SWDBM flag similarly to the arm64 port
* Reuse TEX[2] for SWDBM flag which should be availble
to be used by the operating system if TEX remap
is enabled.
* Introduce SetAndClearPageTableEntryFlags for updating
accessed and modified flags atomically
* Startup sequence is handled similarly to accessed flag, i.e.
set Modified flag in initially mapped pages in bootloader and early map.
* Once the kernel initialization has progressed enough,
pages are mapped as read-only and modified flag handling is done
in the page fault handler.
Change-Id: I8f761e2c6325d1b91481abd569d5e8befded0761
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6518
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>