Skip to content

Commit

Permalink
Add SO_PREFER_BUSY_POLL and SO_BUSY_POLL_BUDGET
Browse files Browse the repository at this point in the history
Remove the comment of these socket options.
Reference: https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/socket.h

Note, musl hardcodes 'SO_*' constants instead of inheriting them from the OS.

Signed-off-by: Pedro Tammela <[email protected]>
  • Loading branch information
tammela committed Nov 27, 2024
1 parent 57dfd5b commit 72bf054
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ SKF_AD_VLAN_TPID
SKF_LL_OFF
SKF_NET_OFF
SO_BSDCOMPAT
SO_BUSY_POLL_BUDGET
SO_NO_CHECK
SO_PREFER_BUSY_POLL
SO_PRIORITY
SO_PROTOCOL
SS
Expand Down
9 changes: 7 additions & 2 deletions src/unix/linux_like/linux/arch/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ cfg_if! {
target_arch = "csky",
target_arch = "loongarch64"
),
// FIXME(musl):
// Musl hardcodes the SO_* constants instead
// of inheriting them from the kernel headers.
// For new constants you might need consider updating
// musl in the CI as well.
not(any(target_env = "musl", target_env = "ohos"))
))] {
pub const SO_TIMESTAMP_NEW: c_int = 63;
Expand All @@ -110,10 +115,10 @@ cfg_if! {
pub const SO_RCVTIMEO_NEW: c_int = 66;
pub const SO_SNDTIMEO_NEW: c_int = 67;
pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
pub const SO_PREFER_BUSY_POLL: c_int = 69;
pub const SO_BUSY_POLL_BUDGET: c_int = 70;
}
}
// pub const SO_PREFER_BUSY_POLL: c_int = 69;
// pub const SO_BUSY_POLL_BUDGET: c_int = 70;

cfg_if! {
if #[cfg(any(
Expand Down

0 comments on commit 72bf054

Please sign in to comment.