Commit graph

5798 commits

Author SHA1 Message Date
Sergio Lopez 8ff52d72c1 linux_like: add rseq syscall
Add the rseq syscall to all arches in linux_like.

Signed-off-by: Sergio Lopez <slp@redhat.com>
2022-03-08 13:06:31 +01:00
Vladimir Michael Eatwell b5987a236d [watch_os] Fix format 2022-03-08 12:05:54 +00:00
Vladimir Michael Eatwell 98e59458c3 [watch_os] add support for Apple WatchOS 2022-03-08 12:02:25 +00:00
bors 1708299c6b Auto merge of #2711 - devnexen:haiku_build_fix, r=Amanieu
haiku build fixes
2022-03-07 23:45:11 +00:00
bors d47792a2d2 Auto merge of #2710 - kraj:rv32, r=Amanieu
riscv32: Define O_LARGEFILE

Some applications (e.g. nix) use this define and expect it to come from libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-07 22:36:04 +00:00
David Carlier 8a729d59f3 haiku build fixes 2022-03-07 21:00:45 +00:00
bors db8c6776c4 Auto merge of #2709 - devnexen:obsd_search_upd, r=Amanieu
openbsd hash search api
2022-03-07 20:49:18 +00:00
Andrew Balmos 6991bfa691
Don't test J1939 on musl.
Kernel headers too old.

Signed-off-by: Andrew Balmos <andrew@balmos.org>
2022-03-07 12:43:06 -05:00
AzureMarker b62064be98
Rename "idealprocessor" attr functions to "processorid" 2022-03-06 12:31:33 -08:00
AzureMarker d38b04a4ea
Add nonstandard pthread_getprocessorid_np function 2022-03-06 12:31:32 -08:00
AzureMarker 9405ad6b77
Replace pthread_getpriority nonstandard function with standard ones
I chose the scheduler priorities based on
https://man7.org/linux/man-pages/man7/sched.7.html

I think the cooperative app cores are most like SCHED_FIFO, while the
sys core is similar to SCHED_RR.

However, I don't think our pthread implementation would be able to
accurately return the right policy since we need to know what processor
the thread is running on, and the only API to get that gets the ID for
the current thread. Since the pthread function passes in a thread ID, we
are unable to always get the processor ID and thus the policy.

In this case, I think we should just always return (and accept in set)
SCHED_FIFO. I don't think this will be used anyways.
2022-03-06 12:31:29 -08:00
AzureMarker cf92808120
Change wording to "ideal processor" and use "np" suffix
Also adds a get version, to keep consistency.
2022-03-06 12:31:06 -08:00
AzureMarker eef23c7017
Change to more standard priority function interfaces 2022-03-06 12:31:05 -08:00
AzureMarker 435f7c3374
Add some extensions to pthread for armv6k-nintendo-3ds
The pthread_attr_t type can have priority and affinity values set.
pthread_getpriority returns the priority of the current thread.

These are needed to enable std thread support. std can't link directly
with libctru so we go through pthread as an intermediate interface.
2022-03-06 12:31:03 -08:00
Ian Chamberlain c8208666bf
Add fixes from libc-test results
(cherry picked from commit 494fc865b0544851a9b18964abf2646628be3006)
2022-03-06 12:18:35 -08:00
Ian Chamberlain 4646be7a6b
Fix uid_t and gid_t sizes on horizon
(cherry picked from commit e84dbb7cb3a015c9f33db9b29019975c669113de)
2022-03-06 12:17:40 -08:00
Ian Chamberlain e99e36e8d1
Add constants for getrandom flags
(cherry picked from commit 4c03853dab634dccef9e5dd8b8f2177ee8c09195)
2022-03-06 12:16:57 -08:00
Ian Chamberlain 6716cdd58a
Add getrandom call on horizon OS
(cherry picked from commit ab957c0cbe1e08519df47180dba3f38a5681a79d)
2022-03-06 12:16:52 -08:00
Khem Raj 08e03530a1 riscv32: Define O_LARGEFILE
Some applications (e.g. nix) use this define and expect it to come from libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-05 22:16:36 -08:00
David Carlier 365ffa80e8 openbsd hash search api 2022-03-05 08:12:51 +00:00
bors ac40e640ce Auto merge of #2707 - devnexen:solarish_ninumericservconst, r=Amanieu
solarish adding newdb constants
2022-03-04 18:47:38 +00:00
Scott Mabin ab62380241 Correct the size of certain types on espidf platform 2022-03-04 14:58:35 +00:00
Andrew Balmos 99045cdc69
Re-add exceptions that are needed by old targets
Signed-off-by: Andrew Balmos <andrew@balmos.org>
2022-03-03 17:17:58 -05:00
David Carlier d046869d82 solarish adding newdb constants 2022-03-03 21:45:25 +00:00
Andrew Balmos 02042f05c2
Update src/unix/linux_like/linux/mod.rs
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2022-03-03 15:36:32 -05:00
Andrew Balmos d590b80766
Exempt J1939 constants and remove old exceptions
Signed-off-by: Andrew Balmos <Andrew Balmos>
2022-03-03 14:17:10 -05:00
Andrew Balmos a5470ce96f
Add SocketCan J1939 constants and structs
Signed-off-by: Andrew Balmos <andrew@balmos.org>
2022-03-03 13:50:33 -05:00
bors 7650116c30 Auto merge of #2705 - devnexen:obsd_lsearch_lfind, r=Amanieu
openbsd add lsearch/lfind fn.
2022-03-03 10:42:45 +00:00
David Carlier 13eda020dc openbsd add lsearch/lfind fn. 2022-03-03 08:17:18 +00:00
bors cd875d3072 Auto merge of #2704 - devnexen:fbsd_libutil_upd, r=Amanieu
adding getlocalbase to freebsd 13
2022-03-02 22:28:56 +00:00
David CARLIER 921130a93f adding getlocalbase to freebsd 13 2022-03-02 22:07:20 +00:00
bors b9d0049b76 Auto merge of #2703 - devnexen:haiku_realhostname, r=Amanieu
haiku realhostname api
2022-03-02 01:00:40 +00:00
bors fd71b7d4cb Auto merge of #2702 - stefanha:blkiomin-blkioopt, r=Amanieu
Add Linux BLKIOMIN and BLKIOOPT ioctl constants

These ioctl constants are used to fetch the minimum and optimal I/O
sizes for block devices.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-03-01 23:34:00 +00:00
David Carlier b94d772a68 haiku realhostname api 2022-03-01 20:05:41 +00:00
Stefan Hajnoczi 496c9ccf4e Add Linux BLKIOMIN and BLKIOOPT ioctl constants
These ioctl constants are used to fetch the minimum and optimal I/O
sizes for block devices.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-03-01 17:12:53 +00:00
bors c029ff79e1 Auto merge of #2699 - devnexen:haiku_shadow, r=Amanieu
posix shadow api for haiku
2022-03-01 00:51:41 +00:00
bors 8933033325 Auto merge of #2701 - androm3da:hexagon_400_sys, r=Amanieu
Add 400-series syscalls to musl hexagon definitions
2022-02-28 23:49:54 +00:00
Brian Cain 356149406f Add 400-series syscalls to musl hexagon definitions 2022-02-27 22:44:37 -06:00
David Carlier fafbc4e6c3 posix shadow api for haiku 2022-02-27 16:34:01 +00:00
bors 5d228ea56c Auto merge of #2698 - devnexen:linux_glibc_getentropy, r=Amanieu
linux glibc add getentropy.
2022-02-26 18:30:26 +00:00
David Carlier 3044f1bc84 linux glibc add getentropy. 2022-02-26 14:34:44 +00:00
bors de9e47704c Auto merge of #2695 - devnexen:solarish_fcntl_update, r=Amanieu
illumos add few fcntl consts
2022-02-23 22:13:42 +00:00
David Carlier 0f109e209d illumos add few fcntl consts 2022-02-23 21:03:06 +00:00
bors 13d18eeb3a Auto merge of #2697 - pfmooney:illumos-siginfo, r=Amanieu
solarish: Expose siginfo_t data as functions

This will bring illumos (and Solaris) functionality in line with the other UNIX (and UNIX-like) platforms, where unions often hamper access to those data fields.
2022-02-23 18:30:40 +00:00
Patrick Mooney 52d5741a43 solarish: Expose siginfo_t data as functions
This will bring illumos (and Solaris) functionality in line with the
other UNIX (and UNIX-like) platforms, where unions often hamper access
to those data fields.
2022-02-23 17:52:50 +00:00
bors 225ef2f3ad Auto merge of #2690 - lancethepants:RLIMIT, r=Amanieu
Set __rlimit_resource_t definition for all uclibc (c_ulong).

Bring all linux RLIMIT definitions into arch/generic/mod.rs or respective architectures.
Define all RLIMIT constants for all architectures.
Move BLKSSZGET/BLKPBSZGET with their other Ioctls Constants.
arch/generic/mod.rs No need to check for mips(64), powerpc(64), or sparc(64).
2022-02-21 23:03:12 +00:00
bors fc52607f00 Auto merge of #2694 - devnexen:solarish_stacktrace_fn, r=Amanieu
solarish backtrace api
2022-02-21 18:38:46 +00:00
lancethepants ad3f860b3c Set __rlimit_resource_t definition for all uclibc (c_ulong).
Bring all linux RLIMIT definitions into arch/generic/mod.rs or respective architectures.
Define all RLIMIT constants for all architectures.
Move BLKSSZGET/BLKPBSZGET with their other Ioctls Constants.
arch/generic/mod.rs No need to check for mips(64), powerpc(64), or sparc(64).
2022-02-21 10:43:11 -07:00
David Carlier 21d86f5a20 solarish backtrace api 2022-02-20 08:42:54 +00:00
bors 3f035c0d5e Auto merge of #2693 - devnexen:solarish_getisax, r=Amanieu
solarish getisax/auxiliary vector constants
2022-02-19 17:40:19 +00:00