| #
28d6ffe3
|
| 26-May-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
eventfd: Add eventfd_signal()
The `eventfd_signal()` function is the equivalent to a write to an eventfd file descriptor: it bumps the internal counter and wakes up processes waiting for it.
`event
eventfd: Add eventfd_signal()
The `eventfd_signal()` function is the equivalent to a write to an eventfd file descriptor: it bumps the internal counter and wakes up processes waiting for it.
`eventfd_signal()` is meant to be used by kernel drivers. DRM drivers will call it through linuxkpi.
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50850
show more ...
|
| #
59316497
|
| 26-May-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
eventfd: Add refcounting
An eventfd file descriptor can be used by drivers such as DRM drivers through linuxkpi. A driver can hold a reference to such a file regardless of the fact it is used by use
eventfd: Add refcounting
An eventfd file descriptor can be used by drivers such as DRM drivers through linuxkpi. A driver can hold a reference to such a file regardless of the fact it is used by userland or not.
This patch introduces a refcount in `struct eventfd`, plus the `eventfd_get()` and `eventfd_put()` functions to acquire and release references. These functions will be used by DRM drivers for instance.
This structure is internal to `sys/kern/sys_eventfd.c` and not used anywhere else. Thus it is safe to add a field without breaking anything.
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50849
show more ...
|
| #
36138969
|
| 16-Oct-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
knotes: kqueue: handle copy for trivial filters
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045
|
| #
0a7c164d
|
| 23-Feb-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
kern/sys_eventfd.c: fix includes
Remove redundant includes like sys/types.h and sys/param.h due to sys/systm.h. Sort alphabetically.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC afte
kern/sys_eventfd.c: fix includes
Remove redundant includes like sys/types.h and sys/param.h due to sys/systm.h. Sort alphabetically.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49163
show more ...
|
| #
ef9ffb85
|
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
| #
f28526e9
|
| 19-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kcmp(2): implement for generic file types
Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518
|
| #
fdafd315
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
8c309d48
|
| 17-Jun-2022 |
Damjan Jovanovic <damjan.jov@gmail.com> |
struct kinfo_file changes needed for lsof to work using only usermode APIs`
Add kf_pipe_buffer_[in/out/size] fields to kf_pipe, and populate them.
Add a kf_kqueue struct to the kf_un union, to allo
struct kinfo_file changes needed for lsof to work using only usermode APIs`
Add kf_pipe_buffer_[in/out/size] fields to kf_pipe, and populate them.
Add a kf_kqueue struct to the kf_un union, to allow querying kqueue state, and populate it.
Populate the kf_sock_rcv_sb_state and kf_sock_snd_sb_state fields in kf_sock for INET/INET6 sockets, and populate all other fields for all transport layer protocols, not just TCP.
Bump __FreeBSD_version.
Differential revision: https://reviews.freebsd.org/D34184 Reviewed by: jhb, kib, se MFC after: 1 week
show more ...
|
| #
2b68eb8e
|
| 01-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove thread argument from VOP_STAT
and fo_stat.
|
| #
1ca6b15b
|
| 20-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Drop "All rights reserved" from my copyright statements.
Add email and fixup years while here.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D30912 MFC after: 2 weeks
|
| #
f570a672
|
| 08-Jun-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Fix copyright, remove "all rights reserved".
The eventfd code was written by me, rdivacky@ copyrigth applicable only to epoll part of the Linuxulator code. Roman is ok to retire his copyright from s
Fix copyright, remove "all rights reserved".
The eventfd code was written by me, rdivacky@ copyrigth applicable only to epoll part of the Linuxulator code. Roman is ok to retire his copyright from sys/kern/sys_eventfd.c and 'All rights reserved.' lines from sys/compat/linux/linux_event.[c|h] and sys/kern/sys_eventfd.c files.
Reviewed by: kib, emaste Approved by: rdivacky Differential Revision: https://reviews.freebsd.org/D30677 MFC after: 2 weeks
show more ...
|
| #
7a202823
|
| 23-Dec-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Expose eventfd in the native API/ABI using a new __specialfd syscall
eventfd is a Linux system call that produces special file descriptors for event notification. When porting Linux software, it is
Expose eventfd in the native API/ABI using a new __specialfd syscall
eventfd is a Linux system call that produces special file descriptors for event notification. When porting Linux software, it is currently usually emulated by epoll-shim on top of kqueues. Unfortunately, kqueues are not passable between processes. And, as noted by the author of epoll-shim, even if they were, the library state would also have to be passed somehow. This came up when debugging strange HW video decode failures in Firefox. A native implementation would avoid these problems and help with porting Linux software.
Since we now already have an eventfd implementation in the kernel (for the Linuxulator), it's pretty easy to expose it natively, which is what this patch does.
Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668
show more ...
|
| #
28d6ffe3
|
| 26-May-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
eventfd: Add eventfd_signal()
The `eventfd_signal()` function is the equivalent to a write to an eventfd file descriptor: it bumps the internal counter and wakes up processes waiting for it.
`event
eventfd: Add eventfd_signal()
The `eventfd_signal()` function is the equivalent to a write to an eventfd file descriptor: it bumps the internal counter and wakes up processes waiting for it.
`eventfd_signal()` is meant to be used by kernel drivers. DRM drivers will call it through linuxkpi.
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50850
show more ...
|
| #
59316497
|
| 26-May-2025 |
Jean-Sébastien Pédron <dumbbell@FreeBSD.org> |
eventfd: Add refcounting
An eventfd file descriptor can be used by drivers such as DRM drivers through linuxkpi. A driver can hold a reference to such a file regardless of the fact it is used by use
eventfd: Add refcounting
An eventfd file descriptor can be used by drivers such as DRM drivers through linuxkpi. A driver can hold a reference to such a file regardless of the fact it is used by userland or not.
This patch introduces a refcount in `struct eventfd`, plus the `eventfd_get()` and `eventfd_put()` functions to acquire and release references. These functions will be used by DRM drivers for instance.
This structure is internal to `sys/kern/sys_eventfd.c` and not used anywhere else. Thus it is safe to add a field without breaking anything.
Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50849
show more ...
|
| #
36138969
|
| 16-Oct-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
knotes: kqueue: handle copy for trivial filters
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045
|
| #
0a7c164d
|
| 23-Feb-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
kern/sys_eventfd.c: fix includes
Remove redundant includes like sys/types.h and sys/param.h due to sys/systm.h. Sort alphabetically.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC afte
kern/sys_eventfd.c: fix includes
Remove redundant includes like sys/types.h and sys/param.h due to sys/systm.h. Sort alphabetically.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49163
show more ...
|
| #
ef9ffb85
|
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
| #
f28526e9
|
| 19-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kcmp(2): implement for generic file types
Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518
|
| #
fdafd315
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
8c309d48
|
| 17-Jun-2022 |
Damjan Jovanovic <damjan.jov@gmail.com> |
struct kinfo_file changes needed for lsof to work using only usermode APIs`
Add kf_pipe_buffer_[in/out/size] fields to kf_pipe, and populate them.
Add a kf_kqueue struct to the kf_un union, to allo
struct kinfo_file changes needed for lsof to work using only usermode APIs`
Add kf_pipe_buffer_[in/out/size] fields to kf_pipe, and populate them.
Add a kf_kqueue struct to the kf_un union, to allow querying kqueue state, and populate it.
Populate the kf_sock_rcv_sb_state and kf_sock_snd_sb_state fields in kf_sock for INET/INET6 sockets, and populate all other fields for all transport layer protocols, not just TCP.
Bump __FreeBSD_version.
Differential revision: https://reviews.freebsd.org/D34184 Reviewed by: jhb, kib, se MFC after: 1 week
show more ...
|
| #
2b68eb8e
|
| 01-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove thread argument from VOP_STAT
and fo_stat.
|