This makes it a little simpler to build FUSE software with userlandfs.
Change-Id: I2a7e5494b7dc8db01e4c150de3fcdb99506ce119
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5197
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Some programs use C11 threads instead of POSIX threads, so this change
implements a light wrapper around POSIX threads that conforms to the
C11 spec.
This code was primarily taken from FreeBSD, with minor modifications:
- The header file was trimmed to only include functions in the C11
spec, and changed to match the format of other Haiku header files
- The thrd_yield function was implemented with its POSIX equivalent
sched_yield instead of the non-standard pthread_yield
- The thrd_create function was changed to return thrd_busy on an
EAGAIN error code instead of unconditionally returning thrd_error
The respective files can be found in the FreeBSD source tree at:
- lib/libstdthreads/threads.h
- lib/libstdthreads/thrd.c
TODO:
- untested (is a unit test in order?)
Change-Id: I422f96f4854cd686f9637fc2e98cb03ce06a764a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5213
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
It is not really needed and everything work fine without it.
Change-Id: I8d1312eba57325c3b80494b697d48aa21f9581a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5163
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* this lets cp from coreutils use lseek to find the data chunks in a
sparse file.
* fix endian conversion macro used for num_blocks_high
Change-Id: I221d6316002b1c491ae987aeef3f25e8721b5ab9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5218
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
It depends on config_manager and was still part of x86 build
Change-Id: I88680bfc5adb5cf3d6d55f514c1f193bffea3963
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5219
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
bus_type has been added to MediaRoster.h and the serial driver.
It is not used enough to be in any shared header.
media_roster only uses it for buffer size estimation.
Change-Id: If4f372d44e871230da4744d99ec7cde0c79c8344
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5209
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
arch_vm_set_memory_type() seems to be x86-specific (cf. MTRR) and
on other architectures it's enough to respect memoryType argument
passed to Map() and Protect()
Change-Id: Ic898b0659c73552d705593dbc3f315dbf504013d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5217
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
also rewrite the fix on read for consistency.
should fix#17708
Change-Id: Ia75ed90ba427db7a7d96aff3457fbce61e857533
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5211
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Whilst testing `starship`, it was apparent that setting both the
foreground & background colours in a single SGR escape is deemed
a valid escape sequence.
* E.g. `ESC[48;2;58;149;199;38;2;47;121;161m` would set the
background to RGB(58,149,199) and foreground to RGB(47,121,161).
Change-Id: I3c14afe2ddf673c85d1678a01e7258587b17f21b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5210
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
config_manager_scan_hardcoded() is never invoked
and there's nothing else in config_manager_arch.c
Change-Id: Iddd0648efa15ffe4a1621b74dbdd1db16039bfe8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5206
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
config_manager_scan_hardcoded() is never invoked
and there's nothing else in config_manager_arch.c
Change-Id: Id3ec90f670de3517cfc9c1d6710c0fa688e5d48b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5205
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
* Create and use *_mouse_acceleration_by_name functions to replace older *_mouse_acceleration functions. Now consistent with related functions (such as *_mouse_speed_by_name).
* Passing mouse_name to HandleGetSetMouseAcceleration in the BMessage fixes mouse acceleration changes not applying properly.
Change-Id: I668cdbbbb81e3cb9069a3fc2ce77e6ef75ba8476
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5189
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* Changes `TERM` to `xterm`, as we're now a full colour capable terminal
* Removes now-obsolete GuessPaletteColor from an RGB triple
* Since it's using a struct instead of uint32 for attributes, add a bunch
of helpers for a cleaner implementation
* Pass the TerminalBuffer's palette to the foreground/background get
helpers, for when an indexed colour is returned
Change-Id: I33bd3bb1407b87a237a8bc355093fe549e05b43a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5195
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
ARM ABI has different alignment requirements based on parameter size:
* parameters not larger than 4 bytes are aligned on 4 bytes
* parameters larger than 4 bytes are aligned on 8 bytes
see:
Procedure Call Standard for the Arm Architecture
sections 5.1, Fundamental Data Types
and 6.5, Parameter Passing
Therefore the following changes are introduced in gensyscalls tool:
* new optional define SYSCALL_LONG_PARAMETER_ALIGNMENT_TYPE is introduced
* it's defined only on ARM
* on other architectures it takes on the value of SYSCALL_PARAMETER_ALIGNMENT_TYPE as a default
* constants kLongParameterAlignmentType and kLongParameterAlignmentSize are introduced
* Syscall::AddParameter uses this value for aligning parameters larger than 4 bytes
Change-Id: I7e766e0ea9d07001643e813722b462b1f044921a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5112
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
I changed the way we decide which registers to use in a previous
patch review but I changed it in only one of two places. As a result
we were using the old code with the new registers, resulting in invalid
backlight settings.
Should fix#17692
Change-Id: I4e977d5700d3a002986beafff5ca511673c86540
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5185
Reviewed-by: Richard Zak <richard.j.zak@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Use BWindow::MoveOnScreen to center the window if it opens outside of the screen frame.
* Fixes#16980.
Change-Id: Icf777aea70ed0e91f57bcd425b3dddbdcb7600df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5180
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* fReportButtonMouseEvent 1002 means only drag events are to be reported.
* only one of the modes 1000/1002/1003 can be selected.
* makes sure to report a button when dragging.
* secondary and tertiary buttons were reversed.
* extended buffer is now filled with snprintf.
* fixes#17684
Change-Id: I59d80937ae193343dc1e7006c4371320fc2182d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5184
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This assumes a Gen9 or Gen11 configuration, and aux channel 0. As a result, the same EDID will
be found for every DDI port. The mapping should be found in the VBT.
Tested on KabyLake and JasperLake
Change-Id: I27f5ac8ec8e6ba519fbe9aaf745e78a7361175b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5175
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Set bits 12 and 2 in SCTLR to enable i-cache and d-cache.
Set cacheability flags in TTBR0 to enable coherent page table walks.
Change-Id: I7f62255b9e49035524ecf87bed12a60dd405f3c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5178
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>