The memalign() function has special semantics for its arguments
even when -fno-builtin is enabled, it seems (that may be a problem
on Clang's part, however.) The alloc_align attribute, which we apply
to the memalign_etc function, does not seem to have the same problems;
at least its documentation at GCC gives no indication that 0 is not a
legal value to pass.
Change-Id: Ie5ba090b924ac3577775165d20f11f9696be97f3
Accepts input with separators based on user's Locale. For example,
with a European locale, "1.234,56" is valid input. With a US locale,
"1,234.56" is accepted. The grouping separator is ignored and
removed, and the decimal separator is kept.
Supports multi-byte decimal separator and grouping separators.
The keypad localization is based on the user's Language setting,
but the separators come from the Formatting. Thus if the Language
is set to English, but the Formatting is set to, for example,
German, the keypad will show '.', but when pressed it will emit
',' to match the number Formatting. Otherwise the keypad breaks
the localized formatting.
Fixes#8503
Change-Id: I0d112bdca67a4e4898e37062102343194ed47f8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4965
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Untested so far.
Change-Id: I3453115599cf2112858a194173212401ae4ac1b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5104
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* This will be needed for the following commit that implements
`pthread_tryjoin_np` and `pthread_timedjoin_np`.
Change-Id: Idccb1aa588d6d10825294d14925d9bd046b65f19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5098
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
this fixes mc support for 256-color skins.
bug #17719
Change-Id: Ifead9fc3acf396cada6f9ce4d83579657b74c86f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5249
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* Add PlaylistFileReader class and derived M3uReader and PlsReader classes.
* Move most of the code from Playlist::AppendM3uToPlaylist to PlaylistFileReader::_AppendItemToPlaylist
* For each File line in the .pls file, a PlaylistItem is added to the MediaPlayer playlist.
* For each Title/Length line, the data is applied to the most recently added PlaylistItem.
* The NumberOfEntries and Version lines are read to make them available for future use, but currently they have no effect.
* Fixes#6813
Change-Id: Ifa23d0df2e4d5b466aa7b85649a78276cff986ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5201
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Add some more details on peripherals.
Change-Id: I65e6ce5ff32cd8b40b95a707460a870f0f4d688e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5239
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* This allows rPI3 reaching the kernel
* Handling & reporting this value helps understanding the behaviour of the different boot contexts
* As long as more real HW platforms are being ported, reusing this value needs to be reevaluated
Change-Id: I1a3b6d8e1df7c9a131875daf2c7abb64b6061ce8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5234
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
In a previous commit I flipped this around because the command interrupt
doesn't always trigger on Ricoh controllers. However, this leads to
command execution continuing before the interrupt actually triggers on
some other controllers.
Might solve #17031 but it could also break things on other hardware.
Change-Id: I96cba90358f0b04ef1ac319aead898c0f4155114
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4985
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Set AP[2:0] and XN flags based on page attributes.
PXN is not implemented as it seems to be available only
in L1 descriptors on ARMv7.
Set TEX, B, C flags based on memoryType:
* B_MTR_UC is mapped to Strongly Ordered (TEX=0, B=0, C=0)
* B_MTR_WC is mapped to Shareable Device Memory (TEX=0, B=1, C=0)
* B_MTR_WT is mapped to Outer and Inner Write-Through, no Write-Allocate (TEX=0, B=0, C=1)
* B_MTR_WB is mapped to Outer and Inner Write-Back, no Write-Allocate (TEx=0, B=1, C=1)
* B_MTR_WP has no direct equivalent on the ARM so it's mapped as B_MTR_WB
* default is Write-Back
Implement ARMPagingMethod32Bit::AttributesToPageTableEntryFlags()
for mapping from page attributes to AP[2:0] and XN flags.
Implement ARMPagingMethod32Bit::PageTableEntryFlagsToAttributes()
for the reverse mapping used in Query() and QueryInterrupt()
i.e. recover page attributes from AP[2:0] and XN flags.
Implement ARMPagingMethod32Bit::MemoryTypeToPageTableEntryFlags()
fr mapping from memoryType to TEX, B, C flags.
Implement ARMVMTranslationMap32Bit::Protect() which used to be commented out.
Accessed and modified flags are not implemented yet, so no such
flags are returned from Query() and QueryInterrupt().
Also because of this, we just invalidate TLB on any call to Protect()
without checking whether the page has been accessed.
Change-Id: I027af5c02bd6218d9f92a58044aeb26373e1956b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5236
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
- All servers are now Werror
- All bus_managers are now Werror
- All input_server add-ons are now Werror
- Some more things in bin/ are Werror
Only tested on x86_64, I'll let the buildbot test on x86_gcc2 and RISC-V
Change-Id: I5ec86512eac729c862828a45d8431f85c4ec422b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5226
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Bootloader:
* set permissions to kernel read/write, no user access
for initially mapped memory areas
* set permissions to kernel read/write, no execute,
no user access for UART
Kernel:
* physical memory mapper uses kernel read/write mapping
with no-execute bit enabled
* all other pages are mapped as read/write/execute for
kernel and user
* proper access permissions and memory types to be
implemented later
Enforce memory access permissions by setting DACR to
client mode for domain #0, no access for other domains.
see ARM Architecture Reference Manual, section B3.7 Memory access control
and in particular the following subsections:
B3.7.1 Access permissions
B3.7.2 Execute-never restrictions on instruction fetching
B3.7.3 Domains, Short-descriptor format only
Change-Id: I8127b4c72dc516d013cb9751d80d6f3a9ec835e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5233
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Exception handler stacks used to be defined in the text segment
which doesn't work very well once we enable memory access permissions
as the text segment is read-only.
Change-Id: I6b28bae09507f23293ede80034db81f5344de4c2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5231
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Map physical memory by default as Normal Memory,
Outer and Inner Write-Back, no Write-Allocate
This corresponds to the following flags:
TEX=0, B=1, C=1
AP flags are not filled in at this point
as access permissions are not enforced.
see also ARM Architecture Reference Manual, section B3.8.2,
Short-descriptor format memory region attributes, without TEX remap
Change-Id: I90bc95a8feb9f22583d41135f4cbd03489fd1b72
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5230
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
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>