Skip to content

apple: add KEVENT_FLAG_* constants#5070

Merged
JohnTitor merged 1 commit intorust-lang:mainfrom
kamalmarhubi:push-qvtorypmlppw
Apr 22, 2026
Merged

apple: add KEVENT_FLAG_* constants#5070
JohnTitor merged 1 commit intorust-lang:mainfrom
kamalmarhubi:push-qvtorypmlppw

Conversation

@kamalmarhubi
Copy link
Copy Markdown
Contributor

Description

apple: add KEVENT_FLAG_* constants

These are values for the flag parameter in the Apple-specific kevent64
syscall.

Sources

https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/event.h#L138-L141

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Apr 22, 2026
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this pull request Apr 22, 2026
Add KEvent64, Kevent64Flags, and Kqueue::kevent64 wrapping the
kevent64 syscall available on apple platforms. This uses fixed-width
64-bit fields and provides an additional ext field for filter-specific
data.

The KEVENT_FLAG_* constants are defined locally as libc does not yet
expose them (rust-lang/libc#5070).
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this pull request Apr 22, 2026
Add KEvent64, Kevent64Flags, and Kqueue::kevent64 wrapping the
kevent64 syscall available on apple platforms. This uses fixed-width
64-bit fields and provides an additional ext field for filter-specific
data.

The KEVENT_FLAG_* constants are defined locally as libc does not yet
expose them (rust-lang/libc#5070).
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this pull request Apr 22, 2026
Add KEvent64, Kevent64Flags, and Kqueue::kevent64 wrapping the
kevent64 syscall available on apple platforms. This uses fixed-width
64-bit fields and provides an additional ext field for filter-specific
data.

The KEVENT_FLAG_* constants are defined locally as libc does not yet
expose them (rust-lang/libc#5070).
Copy link
Copy Markdown
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JohnTitor JohnTitor added this pull request to the merge queue Apr 22, 2026
Merged via the queue into rust-lang:main with commit 708f24e Apr 22, 2026
52 checks passed
@kamalmarhubi
Copy link
Copy Markdown
Contributor Author

kamalmarhubi commented Apr 23, 2026

Thanks @JohnTitor! It's been a while since I made libc changes; how do you decide when to cut releases? Hoping to land the nix-rust side of this soonish too.

edit: also how do backports to the libc-0.2 branch work?

edit on the edit: covered in CONTRIBUTING. I'll create the backport PR myself.

@kamalmarhubi kamalmarhubi deleted the push-qvtorypmlppw branch April 23, 2026 17:27
@JohnTitor JohnTitor mentioned this pull request Apr 23, 2026
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this pull request Apr 25, 2026
Add KEvent64, Kevent64Flags, and Kqueue::kevent64 wrapping the
kevent64 syscall available on apple platforms. This uses fixed-width
64-bit fields and provides an additional ext field for filter-specific
data.

The KEVENT_FLAG_* constants are defined locally as libc does not yet
expose them (rust-lang/libc#5070).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants