Page MenuHomeFreeBSD

eventfd: Rename `struct eventfd` to `struct eventfd_ctx`
AcceptedPublic

Authored by dumbbell on Jun 14 2025, 5:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 3, 3:36 PM
Unknown Object (File)
Fri, Oct 3, 9:03 AM
Unknown Object (File)
Thu, Oct 2, 10:25 PM
Unknown Object (File)
Wed, Oct 1, 3:48 PM
Unknown Object (File)
Wed, Oct 1, 1:46 PM
Unknown Object (File)
Thu, Sep 18, 6:47 AM
Unknown Object (File)
Aug 9 2025, 1:02 PM
Unknown Object (File)
Aug 1 2025, 8:20 PM
Subscribers

Details

Reviewers
emaste
Group Reviewers
linuxkpi
Summary

This is the name of the structure on Linux. I'm about to expose it through linuxkpi as an opaque type. Therefore it allows to use it directly without further compatibility code in linuxkpi.

This structure is otherwise internal to sys/kern/sys_eventfd.c and not used anywhere else. Thus it is safe to change its name without breaking anything.

This is a requirement to the following patch to drm-kmod:
https://github.com/freebsd/drm-kmod/pull/358

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dumbbell edited the summary of this revision. (Show Details)
emaste added a subscriber: emaste.

Hmm, OK. The struct is different and we might end up with a slightly puzzling build failure if things end up cross-threaded, but I suppose it's not really different than the status quo.

This revision is now accepted and ready to land.Jun 24 2025, 12:53 PM

Hmm, OK. The struct is different and we might end up with a slightly puzzling build failure if things end up cross-threaded, but I suppose it's not really different than the status quo.

What do you mean by "cross-threaded"?

What do you mean by "cross-threaded"?

Sorry, it's a colloquialism. I mean that if we somehow end up including Linuxy and FreeBSD headers in the same context we could have an unclear view of what struct eventfd_ctx looks like. But yeah, if it's only ever used as an opaque pointer in Linux code it won't be an issue.