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
Originally _r mostly avoided the buffers in the DIR* and invoked
_kern_read_dir correctly, however that did not interact properly
with the non-reentrant functions and so this method was reworked
some years ago to check entries_left and copy results out of the buffer.
However, that was done improperly; it just copied the structs,
which as they have a VLA at the end, meant the name entry was not
copied at all if an entry was read out of the buffer.
Since we have to read entries out of the buffer anyway,
just invoke the real readdir() and then memcpy what it returns.
Use an ErrnoMaintainer to prevent errno from being affected.
...as was already added to the regular (userland) StaticLibrary some
time ago. Shaves off double-digit percentages of the file size of
e.g. FreeBSD and OpenBSD network drivers.
This change moves the common functions related to EFI memory map
to arch/generic for arm, arm64, x86.
riscv64 and x86_64 shall be handled separately as they use some
more architecture-specific logic:
* riscv64 needs special treatment for the M-mode resident code
located at 0x80000000 which is reported as available in the
EFI memory map provided by u-boot.
* x86_64 has a slightly different logic for building the
memory regions list so some additional rework and testing will be
needed before it can be unified with the generic mmu functions.
Change-Id: I430c84dfc693c5b6f04c170dec8ffb1db2c2ace1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5694
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
a strong monotonicity is a property of system_time(). Performance should be
a bit impacted (around 10%).
removed omit-frame-pointer hints as the compiler generates the same without.
Change-Id: I920145d616604f32b38d9e134ce83f3e0e848bc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5690
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
- Necessary hooks for reading symlinks are implemented
- Added support for local symlinks
- Added support for extent based symlinks
- This patch completes #17791
Change-Id: If6847974562b21f751097df357326f4643eff757
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5621
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
only for Intel newer CPUs.
Change-Id: Icd83f3b643796bfb3725b5c8877b9e7828bc71d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5688
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
only scsi_disk checks the actual value, other drivers take the logical block size.
This change reports the physical block size from the disk rather than the block
size used by IDE/SATA/SCSI commands. On typical modern SATA disks, the SATA
commands will use 512 byte blocks, but the disk will actually read and write
4K blocks internally. This is only of importance for partition alignment for DriveSetup,
and is independant of file systems or partitioning systems. This could also influence
the recommended block size for some file systems.
Change-Id: Id0f2e22659e89fcef64c1f8d04f81cd68995e01f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5667
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
fix f33f4868fe
*_np functions are in a not included header.
add weak aliases for the future functions without _np.
Change-Id: Ie2bcc9173a2b93a6c4052c039cb37930c1c3aaa1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5685
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This will give the same result as fs_stat_dev, so the filesystems will
have the same name everywhere.
Change-Id: Ic684142efaeb2c16b393f3f3e5c9c3010a054b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5636
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
The respective files can be found in the FreeBSD source tree at:
- lib/libstdthreads/call_once.c
- lib/libstdthreads/cnd.c
- lib/libstdthreads/mtx.c
- lib/libstdthreads/threads.h
- lib/libstdthreads/tss.c
Missing is support for PTHREAD_DESTRUCTOR_ITERATIONS.
Change-Id: I7a6c79954f36195eadd1351d308c21a001192232
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5675
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reported by zuMi, while contributing to the Italian translations. Thanks!
Change-Id: I15e8fc17390188c6d0051384d047ebe06d19a2bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5677
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>