| #
2d555ec8
|
| 08-Jan-2026 |
Konstantin Belousov <kib@FreeBSD.org> |
lib/libsys, lib/libc: export pdwait
Make pdwait(2) cancellable, same as all other wait*(2) syscalls wrappers.
Reviewed by: asomers, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC aft
lib/libsys, lib/libc: export pdwait
Make pdwait(2) cancellable, same as all other wait*(2) syscalls wrappers.
Reviewed by: asomers, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54592
show more ...
|
| #
d7847a8d
|
| 13-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
lib{c,sys}: return wrapped syscall APIs to libc
These provide standard APIs, but are implemented using another system call (e.g., pipe implemented in terms of pipe2) or are interposed by the threadi
lib{c,sys}: return wrapped syscall APIs to libc
These provide standard APIs, but are implemented using another system call (e.g., pipe implemented in terms of pipe2) or are interposed by the threading library to support cancelation.
After discussion with kib (see D44111), I've concluded that it is better to keep most public interfaces in libc with as little as possible in libsys.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44241
show more ...
|
| #
228d8c9e
|
| 16-Jan-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: split libc and syscall interposing (2/2)
Move the __libc_interposing implementation to libc/gen so it doesn't end up in libsys.
Reviewed by: kib, emaste, imp Pull Request: https://github.com/
libc: split libc and syscall interposing (2/2)
Move the __libc_interposing implementation to libc/gen so it doesn't end up in libsys.
Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
show more ...
|
| #
9cbd9658
|
| 16-Jan-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: split libc and syscall interposing (1/2)
System calls or their wrappers are now interposed by __libsys_interposing with purely libc entries remaining in __libc_interposing.
Use __libsys_inter
libc: split libc and syscall interposing (1/2)
System calls or their wrappers are now interposed by __libsys_interposing with purely libc entries remaining in __libc_interposing.
Use __libsys_interposing_slot in libthr to update __libsys_interposing, but also make __libc_interposing_slot fall back to __libsys_interposing_slot so an out of date libc has a chance of working during updates.
Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
show more ...
|
| #
211bdd60
|
| 19-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
Add kcmp(2) userspace bits
Unlike Linux, we do provide libc wrapper. All definitions and prototypes are available from <unistd.h>
Tested by: manu Reviewed by: brooks, markj Sponsored by: The Fre
Add kcmp(2) userspace bits
Unlike Linux, we do provide libc wrapper. All definitions and prototypes are available from <unistd.h>
Tested by: manu Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518
show more ...
|
| #
60b2e2d3
|
| 13-Jan-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: stop exposing __fcntl_compat
It was exposed (under FBSDprivate_1.0) for forward compatability in threading libraries in 2008 by commit cd7d66a21f1a. The last consumer was removed in 2015 by c
libc: stop exposing __fcntl_compat
It was exposed (under FBSDprivate_1.0) for forward compatability in threading libraries in 2008 by commit cd7d66a21f1a. The last consumer was removed in 2015 by commit 8495e8b1e9e1. I missed this among the _ and __sys_ symbols in commit e2417a21a025.
Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D43408
show more ...
|
| #
e2417a21
|
| 11-Jan-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: separate syscall and non-syscall symbols
Put declerations of _ and __sys_ prefixed stubs at the top and everything else at the bottom. Sort the bottom list with sort(1). This paves the way to
libc: separate syscall and non-syscall symbols
Put declerations of _ and __sys_ prefixed stubs at the top and everything else at the bottom. Sort the bottom list with sort(1). This paves the way to generate the syscall symbol list.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D43386
show more ...
|
| #
c3207e2d
|
| 27-Nov-2023 |
Brooks Davis <brooks@FreeBSD.org> |
memfd_create: move implementation to libc/gen
Due to memfd_create(3)'s construction of a path to pass to shm_open2(2), it has a much larger than typical dependency footprint for a system call wrappe
memfd_create: move implementation to libc/gen
Due to memfd_create(3)'s construction of a path to pass to shm_open2(2), it has a much larger than typical dependency footprint for a system call wrapper (the list currently includes calloc, memset, sprintf, and strlen). As such, split it off into its own file under libc/gen to lighten libc/sys's dependency list.
Reviewed by: kevans, imp, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42709
show more ...
|
| #
e4a1800f
|
| 15-Nov-2023 |
Brooks Davis <brooks@FreeBSD.org> |
libc: further centralize syscall symbols
All architectures necessarily implement _exit(2) and vfork(2) so declare them in sys/Symbol.map.
Reviewed by: imp, kib, emaste Differential Revision: https:
libc: further centralize syscall symbols
All architectures necessarily implement _exit(2) and vfork(2) so declare them in sys/Symbol.map.
Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D42614
show more ...
|
| #
1ca63a82
|
| 15-Nov-2023 |
Brooks Davis <brooks@FreeBSD.org> |
libc: Remove empty comments in Symbol.map
These were left over from $FreeBSD$ removal.
Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D42612
|
| #
af93fea7
|
| 24-Aug-2023 |
Jake Freeland <jfree@freebsd.org> |
timerfd: Move implementation from linux compat to sys/kern
Move the timerfd impelemntation from linux compat code to sys/kern. Use it to implement the new system calls for timerfd. Add a hook to ker
timerfd: Move implementation from linux compat to sys/kern
Move the timerfd impelemntation from linux compat code to sys/kern. Use it to implement the new system calls for timerfd. Add a hook to kern_tc to allow timerfd to know when the system time has stepped. Add kqueue support to timerfd. Adjust a few names to be less Linux centric.
RelNotes: YES Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack) Differential Revision: https://reviews.freebsd.org/D38459
show more ...
|
| #
4a69fc16
|
| 07-Oct-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add membarrier(2)
This is an attempt at clean-room implementation of the Linux' membarrier(2) syscall. For documentation, you would need to read both membarrier(2) Linux man page, the comments in L
Add membarrier(2)
This is an attempt at clean-room implementation of the Linux' membarrier(2) syscall. For documentation, you would need to read both membarrier(2) Linux man page, the comments in Linux kernel/sched/membarrier.c implementation and possibly look at actual uses.
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32360
show more ...
|
| #
42b38843
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| #
dac31024
|
| 31-Mar-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Rename kqueue1(2) to kqueuex(2) to avoid compat issues with NetBSD
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39377
|
| #
375732cc
|
| 25-Mar-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
kqueue1(2): export the symbol from libc
Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39271
|
| #
53465702
|
| 08-Dec-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
swapoff: add one more variant of the syscall
Requested and reviewed by: brooks Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33343
|
| #
395db99f
|
| 09-Sep-2021 |
Alex Richardson <arichardson@FreeBSD.org> |
Export _mmap and __sys_mmap from libc.so
Unlike the other syscalls these two symbols were missing from the version script. I noticed this while looking into the compiler-rt runtime libraries for CHE
Export _mmap and __sys_mmap from libc.so
Unlike the other syscalls these two symbols were missing from the version script. I noticed this while looking into the compiler-rt runtime libraries for CHERI.
Reviewed by: brooks Obtained from: https://github.com/CTSRD-CHERI/cheribsd/pull/1063 MFC after: 3 days
show more ...
|
| #
9bb8304c
|
| 02-Sep-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
Symbol.map: Remove an extra space before _Fork
Make it consistent with all other entries.
Sponsored by: The FreeBSD Foundation
|
| #
3904e796
|
| 22-Aug-2021 |
Thomas Munro <tmunro@FreeBSD.org> |
Fix aio_readv(2), aio_writev(2) with SIGEV_THREAD.
Add missing wrapper code to librt for these new functions so that SIGEV_THREAD works. Without machinery to convert it to SIGEV_THREAD_ID, you got
Fix aio_readv(2), aio_writev(2) with SIGEV_THREAD.
Add missing wrapper code to librt for these new functions so that SIGEV_THREAD works. Without machinery to convert it to SIGEV_THREAD_ID, you got EINVAL.
Reviewed by: asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31618
show more ...
|
| #
0dc332bf
|
| 05-Aug-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9).
fspacectl(2) is a system call to provide space management support to userspace applications. VOP_DEALLOCATE(9) is a VOP call to perform the
Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9).
fspacectl(2) is a system call to provide space management support to userspace applications. VOP_DEALLOCATE(9) is a VOP call to perform the deallocation. vn_deallocate(9) is a public KPI for kmods' use.
The purpose of proposing a new system call, a KPI and a VOP call is to allow bhyve or other hypervisor monitors to emulate the behavior of SCSI UNMAP/NVMe DEALLOCATE on a plain file.
fspacectl(2) comprises of cmd and flags parameters to specify the space management operation to be performed. Currently cmd has to be SPACECTL_DEALLOC, and flags has to be 0.
fo_fspacectl is added to fileops. VOP_DEALLOCATE(9) is added as a new VOP call. A trivial implementation of VOP_DEALLOCATE(9) is provided.
Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28347
show more ...
|
| #
49ad342c
|
| 02-Aug-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add _Fork()
Current POSIX standard requires fork() to be async-signal safe. Neither our implementation, nor implementations in other operating systems are, and practically it is impossible to make
Add _Fork()
Current POSIX standard requires fork() to be async-signal safe. Neither our implementation, nor implementations in other operating systems are, and practically it is impossible to make fork() async-signal safe without too much efforts. Also, that would put undue requirement that all atfork handlers should be async-signal safe as well, which contradicts its main use.
As result, Austin Group dropped the requirement, and added a new function _Fork() that should be async-signal safe, but it does not call atfork handlers. Basically, _Fork() can be implemented as a raw syscall.
Release of glibc 2.34 added _Fork(), do the same for FreeBSD. Clarify threading behavior for fork() in the manpage.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D31378
show more ...
|
| #
21f749da
|
| 10-Jan-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child.
Reviewed by: markj MFC after: 1 week Sponsored by
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child.
Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28088
show more ...
|
| #
022ca2fc
|
| 02-Jan-2021 |
Alan Somers <asomers@FreeBSD.org> |
Add aio_writev and aio_readv
POSIX AIO is great, but it lacks vectored I/O functions. This commit fixes that shortcoming by adding aio_writev and aio_readv. They aren't part of the standard, but the
Add aio_writev and aio_readv
POSIX AIO is great, but it lacks vectored I/O functions. This commit fixes that shortcoming by adding aio_writev and aio_readv. They aren't part of the standard, but they're an obvious extension. They work just like their synchronous equivalents pwritev and preadv.
It isn't yet possible to use vectored aiocbs with lio_listio, but that could be added in the future.
Reviewed by: jhb, kib, bcr Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27743
show more ...
|
| #
3ef55e8f
|
| 09-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Add shm_create_largepage(3) helper for creation and configuration of largepage shm objects.
And since we can, add memfd_create(MFD_HUGETLB) support, hopefully close enough to the Linux feature.
Rev
Add shm_create_largepage(3) helper for creation and configuration of largepage shm objects.
And since we can, add memfd_create(MFD_HUGETLB) support, hopefully close enough to the Linux feature.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
show more ...
|
| #
6f05ed08
|
| 28-May-2020 |
Rick Macklem <rmacklem@FreeBSD.org> |
Add an entry to Symbol.map for the rpctls_syscall added by r361599.
Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D24949
|