Skip to content

Commit 8ddba26

Browse files
committed
Add SO_PREFER_BUSY_POLL and SO_BUSY_POLL_BUDGET
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]>
1 parent 57dfd5b commit 8ddba26

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

libc-test/semver/linux-gnu-x86_64.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
2222
PTRACE_GET_RSEQ_CONFIGURATION
2323
PTRACE_SYSEMU
2424
PTRACE_SYSEMU_SINGLESTEP
25+
SO_BUSY_POLL_BUDGET
26+
SO_PREFER_BUSY_POLL
2527
_libc_fpstate
2628
flock64
2729
getcontext

src/unix/linux_like/linux/arch/generic/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ cfg_if! {
102102
target_arch = "csky",
103103
target_arch = "loongarch64"
104104
),
105+
// FIXME(musl):
106+
// Musl hardcodes the SO_* constants instead
107+
// of inheriting them from the kernel headers.
108+
// For new constants you might need consider updating
109+
// musl in the CI as well.
105110
not(any(target_env = "musl", target_env = "ohos"))
106111
))] {
107112
pub const SO_TIMESTAMP_NEW: c_int = 63;
@@ -110,10 +115,10 @@ cfg_if! {
110115
pub const SO_RCVTIMEO_NEW: c_int = 66;
111116
pub const SO_SNDTIMEO_NEW: c_int = 67;
112117
pub const SO_DETACH_REUSEPORT_BPF: c_int = 68;
118+
pub const SO_PREFER_BUSY_POLL: c_int = 69;
119+
pub const SO_BUSY_POLL_BUDGET: c_int = 70;
113120
}
114121
}
115-
// pub const SO_PREFER_BUSY_POLL: c_int = 69;
116-
// pub const SO_BUSY_POLL_BUDGET: c_int = 70;
117122

118123
cfg_if! {
119124
if #[cfg(any(

0 commit comments

Comments
 (0)