Commit Graph

9812 Commits

Author SHA1 Message Date
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
David Karoly
cec78ae332 kernel/arm64: introduce virtual_ranges_to_keep
Change-Id: I6de950cb18892ebf2dd2aefa34b65b90a17e3f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5682
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-23 13:57:43 +00:00
David Karoly
a0c8f15f33 kernel/arm64: implement iframe stack and unwinding
Change-Id: I1587c1f57bd73777a188bb8f1bc58263de82fcb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5684
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-23 13:56:16 +00:00
Jérôme Duval
688acf41a3 add physical_block_size field where applicable
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>
2022-09-23 06:56:01 +00:00
Jérôme Duval
146d687026 cpu_type.h: remove vendor string at any place
fix bug #17951

Change-Id: Icc0ac964ff9c6322612dadb459d28a97ac69e91a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5686
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 19:02:08 +00:00
PulkoMandy
e3d5904751 Disk Device Manager: generate a name for nameless volumes
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>
2022-09-21 16:14:32 +00:00
X512
74a5cb7bbc shared: move ScopeExit from riscv64 arch kernel code
this file is c++11 only.

Change-Id: Ibff7acec00337a9f56f9b8e29ea262c8d64c2446
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5292
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-21 16:09:33 +00:00
Jérôme Duval
799ab823bb libroot: Add support for C11 Threads missing parts (except gcc2).
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>
2022-09-19 19:45:45 +00:00
David Karoly
ef89435316 boot/x86: unify KERNEL_LOAD_ADDRESS for BIOS and EFI
Change-Id: Ia3157c7c0908698da94c1aa85cb6366fb00fb7f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5670
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-09-19 14:51:58 +00:00
David Karoly
303283fb7a kernel/arm64: implement stack trace
Change-Id: If5627fb4d37bdb7260d7e14c0c3e8cf7bcbee53d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5672
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-19 14:51:18 +00:00
David Karoly
f9be2680d9 x86: use elif defined(__x86_64__) in arch_kernel.h
Change-Id: Ibad5f34d73d48c5d1af870131f20ae9b52d88eb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5664
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-15 04:33:47 +00:00
PulkoMandy
49a00a128a userlandfs: implement get_fs_info using ioctl
This avoids introducing an entirely custom hook in FUSE.
It uses the ioctl hook in an unconventional way (calling it with no
valid fuse_file_info) but this can be fixed if a filesystem requires it
(by opening a file handle on /, doing the ioctl, then closing again).

An updated version of fusesmb-haiku is available and confirmed working:
https://github.com/haikuarchives/fusesmb-haiku

Change-Id: If1268113874363fa035e5340be75e9f5198216d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5199
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-09-13 18:51:12 +00:00
PulkoMandy
d469ab6d6c libroot: Remove unused files
Not referenced in any Jamfile, does not compile, untouched since
2003 except for a few coding style and cppcheck fixes. The functionality
is implemented elsewhere in the disk device manager and userland
filesystem add-ons for DriveSetup.

Change-Id: I5ebe125931c8d4410c2d335f9d6c0e32008f038b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5637
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-13 18:43:55 +00:00
Michael Brumbelow
950809231f Removed 'register' storage class compiler warnings
Change-Id: Iba89a9d0845bf7e816983f903281d33e273f6e35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5558
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-12 14:03:28 +00:00
Augustin Cavalier
66af664352 Drop the unused TTY bus_manager.
Just stubs and not actually used.
We have a TTY module (and driver) which supplant it.
2022-09-09 17:14:12 -04:00
Alexander von Gluck IV
b6b61bd39f general/logs: Ensure all logs start with THING:
* 90% of our logs start with some context on what is
  generating a log message (thing:)
* Things following this logging model however do "thing [time"
  which is inconsistent
* Being consistent will allow us to start scanning logs in a
  smart way and try to analyze patterns of what is throwing
  errors, etc in an automatic way.
  aka /^(service/driver/etc)\:/

Change-Id: I1ef2df4f17f70f858a485554a4e8a3f87f1a69c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5568
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-09-08 17:59:21 +00:00
David Karoly
3bfbf2fb53 kernel/arm: check for PXN and alignment fault in page fault handler
Change-Id: I2a863b57b1252343c9c029d1bb5af8d328558576
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5620
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-05 17:29:49 +00:00
David Karoly
17569c02ff kernel/arm: clean up arch-specific defines
* align fault syndrome and fault address register naming with
  ARM Architecture Reference Manual (i.e. IFSR, DFSR, IFAR, DFAR)
* move PSR bitfield defines to arch_cpu_defs.h

Change-Id: I813045eec335ffbdd75270ad5a1afb2f222f73c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5618
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 19:11:05 +00:00
David Karoly
67406e5145 kernel/arm: save FPU registers on context switch
Change-Id: Icb62688338d3a3083f8f6d1874cae3218ba042e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5614
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 17:33:49 +00:00
David Karoly
3d79cd3332 kernel/arm: set PXN for user memory
* set PXN for all page tables below KERNEL_BASE
* also set PXN for physical page mapper

PXN, Privileged execute-never

When the PXN bit is 1, a Permission fault is generated if the processor
is executing at PL1 and attempts to execute an instruction fetched from
the corresponding memory region.

Change-Id: I3056cbed151004ac9edfbc81ebeada328aeb603c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5607
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:24:08 +00:00
David Karoly
c0a7601219 kernel/arm: store current thread pointer in TPIDRPRW register
Use the Privileged Only Thread ID Register aka TPIDRPRW to store
the current thread pointer.

The Privileged Only Thread ID Register is only accessible
in privileged modes, and is read/write.

see: ARMv7 Architecture Reference Manual,
section B3.12.46 CP15 c13 Software Thread ID registers

Change-Id: I5273bee8a80b78cdc547b2f6c96632d120eb3d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5608
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:23:53 +00:00
Augustin Cavalier
1f0c87711b shared/IconView: Add a variant of SetIcon which directly accepts a BBitmap. 2022-08-31 16:16:43 -04:00
Augustin Cavalier
90d62fd900 TLS.h: Drop inline assembly from the header.
This was a holdover from BeOS, which did this as inline assembly.
We do not on any platform other than 32-bit x86, and even there
we may have preferred to do things a little differently on non-BeOS
ABIs.

Most things ported from other systems, or even native apps, are going to
use _Thread_local variables anyway, which will bypass this system
altogether.
2022-08-30 00:00:04 -04:00
Augustin Cavalier
da9dee377d HaikuControlLook: Scale the width of the popup dropdown region.
Instead of hardcoding it.
TODO: Other ControlLooks in the tree should also be fixed for this.
2022-08-26 14:42:17 -04:00
Augustin Cavalier
3efde1bfba Tracker: Use BControlLook::ComposeIconSize.
One computation was functionally equivalent to the new method,
other places were not scaling icons at all.

Fixes #13177.
2022-08-25 16:48:56 -04:00
Augustin Cavalier
874a2a7287 BControlLook: Introduce ComposeIconSize().
This takes an int32 (e.g. B_MINI_ICON or another constant) and
then returns a BSize scaled appropriately, the same as ComposeSpacing()
does already for the *_SPACING constants.

This will be used to replace icon size computations throughout the tree.
2022-08-25 16:45:48 -04:00
David Karoly
c34046ba70 arm: increase number of io vectors to 1024
GICv2 can use interrupt numbers up to 1019:
* 0-15 are SGIs aka ICIs
* 16-31 are PPIs
* 32-1019 are SPIs

Change-Id: I1c19be77105683da3f6988a5607b14dc10a899db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5565
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-25 00:46:31 +00:00
David Karoly
226dd60a57 arm64: initialize PCI interrupts from FDT
see:
https://www.devicetree.org/open-firmware/practice/imap/imap0_9d.pdf

Change-Id: I4158b022fd4404e3126f92ee844743e39a9b6646
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5560
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-08-24 09:41:35 +00:00
Augustin Cavalier
a028a54e52 libroot: Replace strftime/strptime/wcsftime implementations with musl's.
Now that we have locale_t, we can use the musl versions of these functions.
This also fixes a licensing issue: the strptime implementation had an
advertising clause (although in upstream *BSD it was removed, so we
likely could have managed to remove it anyway.)
2022-08-18 15:31:38 -04:00
Jérôme Duval
013719cfc6 kernel: get_iovecs_from_user(): checks total iovec length against SSIZE_MAX
* the return type for recvmsg(), sendmsg(), readv(), writev() is ssize_t.
* check required by POSIX.
* fix memory leaks on failure introduced in 00f1e7c5e4

Change-Id: Ibf74ae2035b7e9c7a3db3613f60e06672ded4db0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5542
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-17 19:44:30 +00:00
milek7
6bef283b50 arm64: Discover PCI from ACPI.
Change-Id: I2e40c8a531f319cce25363ab83d4d0fe9f8702d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5274
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>
2022-08-17 19:23:51 +00:00
David Karoly
079db739a6 virtio-mmio: discover devices from ACPI
https://www.kernel.org/doc/Documentation/arm64/arm-acpi.txt
https://wiki.linaro.org/LEG/ServerArchitecture/ACPI/LinaroRegistry

Change-Id: I330a497173c0a82b789a43720e3d86e1513a661b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5506
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2022-08-13 09:43:41 +00:00
David Karoly
fe2b6d7706 arm: detect SoC timer from FDT for OMAP3 and PXA
Change-Id: Ib03a11f016cb937d748d2696a17158e17c86e317
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5522
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-08-09 18:15:55 +00:00
John Scipione
3ef6915cf3 IK: Propagate B_WORKSPACE_ACTIVATED to child views
... and B_WORKSPACES_CHANGED too.

hrev50148 propagated B_SCREEN_CHANGED messages to
children allowing them to respond to screen changes
fixing #8035 back in 2016.

This does the same thing for workspace messages only
I spelled propagate correctly this time.

Add private _PropagateMessageToChildViews() convinience
method to BWindow to do this work.

Call PostMessage() instead of calling MessageReceived()
directly which can work better in certain circumstances.

Change-Id: I5978c3fe674bbe75d9eafb7afb654a49ee3e0c11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5516
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-08 15:32:47 +00:00
Jérôme Duval
265899da3a radeon_hd: from Cedar, memory sizes as bytes only for PALM/SUMO/SUMO2
should help with #17664
register change from Tahiti for #17377

Change-Id: I52b9691cd6a04b58b70e905bc29e803f06936789
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5526
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-05 12:42:57 +00:00
Trung Nguyen
d02c0bade7 libs/posix: Fix NULL pointer in uselocale
uselocale now attempts to create a backend and a databrige.

If the attempt fails due to a missing libroot-addon-icu, uselocale
does nothing (to support applications calling uselocale during
startup to enforce the C locale).

Else, uselocale will fail with ENOMEM.

LocaleBackend::CreateBackend() has been modified to return a status_t
that indicates whether NULL is returned due to out of memory (B_NO_MEMORY)
or due to being unable to load the ICU addon (B_MISSING_LIBRARY).

Change-Id: I0f62ebde5890364c64e6694ec58d38de43ec6841
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5505
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-03 00:16:08 +00:00
Pascal Abresch
46fdf97dea Interface Kit: add default dark appearence color constants
Change-Id: I8added6ada702eb09e95f5f2d6e34b748067c6bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4571
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 14:10:18 +00:00
milek7
81e0d2d4c2 arm64: Discover GICv2 from ACPI.
Change-Id: I89f2968a756d767f3a88c002292696a725a00918
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5275
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 07:56:07 +00:00
milek7
17f0f4b68f arm64: Discover UART device from ACPI.
Change-Id: I4e97b05dcfcaf6abddff81fbbf676c38fe337775
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5271
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-24 07:56:07 +00:00
David Karoly
91ee0332c3 move acpi headers from x86 to non-arch
Change-Id: Ida6186af7a40fb7d91b4da92c36d25db30dadb33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5484
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-20 08:28:53 +00:00
PulkoMandy
f0ee02b25e userlandfs_fuse_lowlevel: fix opening directories in Tracker
- It is possible to call open() on a directory, but FUSE lowlevel
  filesystems don't implement that and expect it to be re-routed to the
  opendir call. BRoster uses this to read the dir/file attributes to
  identify it, so it could not identify directories properly.
- In ReadDir, make sure to not return more entries than asked, as this
  confuses the userlandfs protocol communication (the kernel does not
  acknowledge the readdir reply, and then the server hits an assert when
  receiving the next request instead of the ack).

Change-Id: I9c4e9a3f0fc6e9879d4cfbc0d5402a4733d2218a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5482
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-19 16:06:29 +00:00
PulkoMandy
0604d554e8 userlandfs: compatibility with FUSE 2.9 and FUSE lowlevel API
- Import latest version of files from FUSE 2.9.9 (our last
  synchronization was with 2.7.4)
- Adjust fuse pkgconfig file to use the POSIX error mapper
  automatically, since that's required for all FUSE software
- Implement the lowlevel API in addition to the highlevel one. The
  lowlevel API uses inode numbers to identify files, rather than paths,
  making it a better fit to the userlandfs architecture.

The FUSE 2.x branch is not maintained anymore by FUSE developers,
however, pretty much no one migrated to FUSE 3.x. So it is more
interesting to implement, rather than 3.x.

Confirmed still working with sshfs and curlftpfs.

Example use:

I tested this with github.com/whoozle/android-file-transfer-linux

- Build the fuse library and copy it to ~/config/non-packaged/add-ons/userlandfs/
- Start the server: /system/servers/userlandfs_server aft-mtp-mount
- Connect your Android phone and put it in USB file transfer mode
- Mount the device: mount -t userlandfs -p 'aft-mtp-mount /boot/home/MyPhone -d -o use_ino' ~/MyPhone
- You can now access your phone data

Change-Id: Ic3efda7ffbc33737e6f4958428fb3ec9939ef105
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5198
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-19 16:06:29 +00:00
Augustin Cavalier
5e596efecf Refactor touchpad movement generation by migrating MovementMaker to userland.
This considerably overhauls touchpad event generation, simplifying and
cleaning it up considerably:

 * Return the touchpad specifications through the MS_IS_TOUCHPAD ioctl.

 * There is now a dedicated MS_READ_TOUCHPAD ioctl, as touchpads
   can either return touchpad_movement structures or mouse_movement
   ones depending on what mode they are operating in.

 * Event repeating on timeouts is now handled in MovementMaker and
   the input_server control thread, so MS_READ_TOUCHPAD takes
   a timeout value. This means we can drop all the EventProducers.

 * Use the real floating-point math functions in MovementMaker now
   that we are running in userland.

 * Drop unused structures, constants, headers, and other things
   related to touchpad support.

Change-Id: I28cdb28e4100393a9338a8ebb865573cec13fc1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5455
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-07-18 16:00:29 +00:00
Trung Nguyen
d338200e2b libs/posix: Implemented new locale functions
Implemented the missing POSIX functions in <locale.h>:
newlocale, duplocale, uselocale, and freelocale, and also
provided missing type definitions for <locale.h>.

Implemented missing POSIX locale-based function variants.

Modified LocaleBackend so that it could support thread-local
locales.

Some glibc-like locale-related variables supporting
ctype and printf family of functions have also been updated
to reflect the thread-local variables present in the latest
glibc sources.

As there have been some modifications to global symbols
in libroot, libroot_stubs.c has been regenerated.

Bug: #17168
Change-Id: Ibf296c58c47d42d1d1dfb2ce64042442f2679431
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5351
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-11 16:30:16 +00:00
Leorize
86fa1c21e1 Shared Kit: Introduce BMemoryRingIO, a thread-safe ring buffer
This commit introduces a simple thread-safe ring buffer implementation
based on top of BDataIO. The main use case for this class will be to
implement shared buffers between threads for the upcoming refactoring
of Services Kit.

Change-Id: I526bc044b28c91496ad996fabebe538e75647f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2966
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-11 16:29:53 +00:00
David Karoly
2e0a9b9554 kernel/arm: use generic/user_memory.h
Change-Id: I890bdd7d6f64162416a1a80c7d8280618aaa8fb8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5429
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-07-04 16:43:39 +00:00
Augustin Cavalier
045f7a5f3a headers/bsd: Rewrite link_elf.h.
Include only the APIs we are (shortly) going to actually support.

The other structures and functions declared in this file were
never supported nor used anywhere in Haiku's tree.
2022-06-28 13:07:53 -04:00
Alexander von Gluck IV
774c33c2a7 radeon_hd: Drop unused overlay, cursor registers
* Also drop unused vblank semaphore storage
* Spotted by X512. These are from intel_extreme
  which was used as a base *ages* ago.

Change-Id: I2a6baaa4849baeb8c8cf10e2046d0fbe10c3a356
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5389
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>
2022-06-20 02:46:55 +00:00
Mashijams
9c4a46b318 xfs : version 5 superblock, checksum header file
- Implemented version 5 superblock fields and necessary macros.

- Checksum functions are implemented which will be used for crc verification and crc updates.

- fssh_kernal_priv.h ROUNDDOWN macro definition is consistent with kernal.h definition.

Change-Id: I49b7c939bfd3ea1bffc85b3db42bc678dcce75cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5350
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-06-18 08:32:18 +00:00