authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2026-04-16 23:38:08+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-17 22:56:03+02:00
log3f5305bab713fe477d949b2499341dd3e8befd9d
treeb8c30f88348cb9e26ea7c11c578fafdd77e4afa2
parentcfee71385725c0997f319c5d73e2cdaf52cc5918
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: Fix serenity's futex() declaration

Two mistakes I made when translating from the C header: - The timeout and userspace_address2 pointers should be nullable. - futex_wait() and futex_wake() are defined as static functions and therefore not available as exported symbols. They're just thin wrappers around futex() anyway so that's fine.

2 files changed, 1 insertions(+), 5 deletions(-)

lib/std/c.zig-2
......@@ -11451,8 +11451,6 @@ pub const disown = serenity.disown;
1145111451pub const profiling_enable = serenity.profiling_enable;
1145211452pub const profiling_disable = serenity.profiling_disable;
1145311453pub const profiling_free_buffer = serenity.profiling_free_buffer;
11454pub const futex_wait = serenity.futex_wait;
11455pub const futex_wake = serenity.futex_wake;
1145611454pub const purge = serenity.purge;
1145711455pub const perf_event = serenity.perf_event;
1145811456pub const perf_register_string = serenity.perf_register_string;
lib/std/c/serenity.zig+1-3
......@@ -53,9 +53,7 @@ pub extern "c" fn profiling_enable(pid: pid_t, event_mask: PERF_EVENT) c_int;
5353pub extern "c" fn profiling_disable(pid: pid_t) c_int;
5454pub extern "c" fn profiling_free_buffer(pid: pid_t) c_int;
5555
56pub extern "c" fn futex(userspace_address: *u32, futex_op: c_int, value: u32, timeout: *const timespec, userspace_address2: *u32, value3: u32) c_int;
57pub extern "c" fn futex_wait(userspace_address: *u32, value: u32, abstime: *const timespec, clockid: clockid_t, process_shared: c_int) c_int;
58pub extern "c" fn futex_wake(userspace_address: *u32, count: u32, process_shared: c_int) c_int;
56pub extern "c" fn futex(userspace_address: *u32, futex_op: c_int, value: u32, timeout: ?*const timespec, userspace_address2: ?*u32, value3: u32) c_int;
5957
6058pub extern "c" fn purge(mode: c_int) c_int;
6159