authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-08-23 18:55:15-07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-08-23 18:55:15-07:00
log4f2f74423ac954516cbd769f4eda9e09f26addb1
treef3fc7c16f5432dca71ad0d5ef7eaf4d65f0c49a5
parent34b4720ea10ebe396dc48c21afe62e1570ecadb6
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

remove pthread function wrappers


1 files changed, 0 insertions(+), 116 deletions(-)

mod.zig-116
...@@ -3538,39 +3538,6 @@ pub fn munmap(addr: *const anyopaque, len: usize) errno.Error!void {...@@ -3538,39 +3538,6 @@ pub fn munmap(addr: *const anyopaque, len: usize) errno.Error!void {
3538 if (rc == -1) return errno.fromInt(errno.fromLibC());3538 if (rc == -1) return errno.fromInt(errno.fromLibC());
3539 std.debug.assert(rc == 0);3539 std.debug.assert(rc == 0);
3540}3540}
3541pub fn pthread_attr_init(attr: *pthread_attr_t) void {
3542 const rc = libc.pthread_attr_init(attr);
3543 std.debug.assert(rc == 0);
3544}
3545pub fn pthread_attr_destroy(attr: *pthread_attr_t) void {
3546 const rc = libc.pthread_attr_destroy(attr);
3547 std.debug.assert(rc == 0);
3548}
3549pub fn pthread_attr_setstacksize(attr: *pthread_attr_t, size: usize) !void {
3550 const rc = libc.pthread_attr_setstacksize(attr, size);
3551 if (rc != 0) return errno.fromInt(rc);
3552 std.debug.assert(rc == 0);
3553}
3554pub fn pthread_attr_setguardsize(attr: *pthread_attr_t, size: usize) !void {
3555 const rc = libc.pthread_attr_setguardsize(attr, size);
3556 if (rc != 0) return errno.fromInt(rc);
3557 std.debug.assert(rc == 0);
3558}
3559pub fn pthread_create(noalias newthread: *pthread_t, noalias attr: *const pthread_attr_t, start_routine: *const fn (*anyopaque) callconv(.c) ?*anyopaque, noalias arg: *anyopaque) !void {
3560 const rc = libc.pthread_create(newthread, attr, start_routine, arg);
3561 if (rc != 0) return errno.fromInt(rc);
3562 std.debug.assert(rc == 0);
3563}
3564pub fn pthread_detach(thread: pthread_t) !void {
3565 const rc = libc.pthread_detach(thread);
3566 if (rc != 0) return errno.fromInt(rc);
3567 std.debug.assert(rc == 0);
3568}
3569pub fn pthread_join(thread: pthread_t, retval: ?*?*anyopaque) !void {
3570 const rc = libc.pthread_join(thread, retval);
3571 if (rc != 0) return errno.fromInt(rc);
3572 std.debug.assert(rc == 0);
3573}
3574pub fn sched_getaffinity(pid: pid_t) !cpu_set_t {3541pub fn sched_getaffinity(pid: pid_t) !cpu_set_t {
3575 var cpuset: cpu_set_t = undefined;3542 var cpuset: cpu_set_t = undefined;
3576 const rc = libc.sched_getaffinity(pid, @sizeOf(cpu_set_t), &cpuset);3543 const rc = libc.sched_getaffinity(pid, @sizeOf(cpu_set_t), &cpuset);
...@@ -3578,61 +3545,6 @@ pub fn sched_getaffinity(pid: pid_t) !cpu_set_t {...@@ -3578,61 +3545,6 @@ pub fn sched_getaffinity(pid: pid_t) !cpu_set_t {
3578 std.debug.assert(rc == 0);3545 std.debug.assert(rc == 0);
3579 return cpuset;3546 return cpuset;
3580}3547}
3581pub fn pthread_mutex_init(mutex: *pthread_mutex_t, attr: ?*const pthread_mutexattr_t) !void {
3582 const rc = libc.pthread_mutex_init(mutex, attr);
3583 if (rc != 0) return errno.fromInt(rc);
3584 std.debug.assert(rc == 0);
3585}
3586pub fn pthread_mutex_destroy(mutex: *pthread_mutex_t) !void {
3587 const rc = libc.pthread_mutex_destroy(mutex);
3588 if (rc != 0) return errno.fromInt(rc);
3589 std.debug.assert(rc == 0);
3590}
3591pub fn pthread_mutex_trylock(mutex: *pthread_mutex_t) !void {
3592 const rc = libc.pthread_mutex_trylock(mutex);
3593 if (rc != 0) return errno.fromInt(rc);
3594 std.debug.assert(rc == 0);
3595}
3596pub fn pthread_mutex_lock(mutex: *pthread_mutex_t) !void {
3597 const rc = libc.pthread_mutex_lock(mutex);
3598 if (rc != 0) return errno.fromInt(rc);
3599 std.debug.assert(rc == 0);
3600}
3601pub fn pthread_mutex_unlock(mutex: *pthread_mutex_t) !void {
3602 const rc = libc.pthread_mutex_unlock(mutex);
3603 if (rc != 0) return errno.fromInt(rc);
3604 std.debug.assert(rc == 0);
3605}
3606pub fn pthread_cond_init(noalias cond: *pthread_cond_t, noalias attr: ?*const pthread_condattr_t) !void {
3607 const rc = libc.pthread_cond_init(cond, attr);
3608 if (rc != 0) return errno.fromInt(rc);
3609 std.debug.assert(rc == 0);
3610}
3611pub fn pthread_cond_destroy(cond: *pthread_cond_t) !void {
3612 const rc = libc.pthread_cond_destroy(cond);
3613 if (rc != 0) return errno.fromInt(rc);
3614 std.debug.assert(rc == 0);
3615}
3616pub fn pthread_cond_wait(noalias cond: *pthread_cond_t, noalias mutex: *pthread_mutex_t) !void {
3617 const rc = libc.pthread_cond_wait(cond, mutex);
3618 if (rc != 0) return errno.fromInt(rc);
3619 std.debug.assert(rc == 0);
3620}
3621pub fn pthread_cond_timedwait(noalias cond: *pthread_cond_t, noalias mutex: *pthread_mutex_t, noalias abstime: *const struct_timespec) !void {
3622 const rc = libc.pthread_cond_timedwait(cond, mutex, abstime);
3623 if (rc != 0) return errno.fromInt(rc);
3624 std.debug.assert(rc == 0);
3625}
3626pub fn pthread_cond_signal(cond: *pthread_cond_t) !void {
3627 const rc = libc.pthread_cond_signal(cond);
3628 if (rc != 0) return errno.fromInt(rc);
3629 std.debug.assert(rc == 0);
3630}
3631pub fn pthread_cond_broadcast(cond: *pthread_cond_t) !void {
3632 const rc = libc.pthread_cond_broadcast(cond);
3633 if (rc != 0) return errno.fromInt(rc);
3634 std.debug.assert(rc == 0);
3635}
3636pub fn mkdtemp(template: [*:0]u8) ![*:0]u8 {3548pub fn mkdtemp(template: [*:0]u8) ![*:0]u8 {
3637 const rc = libc.mkdtemp(template);3549 const rc = libc.mkdtemp(template);
3638 if (rc == null) return errno.fromInt(errno.fromLibC());3550 if (rc == null) return errno.fromInt(errno.fromLibC());
...@@ -3659,34 +3571,6 @@ pub fn faccessat(fd: c_int, path: [*:0]const u8, amode: c_int, flag: c_int) !voi...@@ -3659,34 +3571,6 @@ pub fn faccessat(fd: c_int, path: [*:0]const u8, amode: c_int, flag: c_int) !voi
3659 if (rc == -1) return errno.fromInt(errno.fromLibC());3571 if (rc == -1) return errno.fromInt(errno.fromLibC());
3660 std.debug.assert(rc == 0);3572 std.debug.assert(rc == 0);
3661}3573}
3662pub fn pthread_rwlock_init(noalias rwlock: *pthread_rwlock_t, noalias attr: ?*const pthread_rwlockattr_t) !void {
3663 const rc = libc.pthread_rwlock_init(rwlock, attr);
3664 if (rc != 0) return errno.fromInt(rc);
3665}
3666pub fn pthread_rwlock_destroy(rwlock: *pthread_rwlock_t) !void {
3667 const rc = libc.pthread_rwlock_destroy(rwlock);
3668 if (rc != 0) return errno.fromInt(rc);
3669}
3670pub fn pthread_rwlock_rdlock(rwlock: *pthread_rwlock_t) !void {
3671 const rc = libc.pthread_rwlock_rdlock(rwlock);
3672 if (rc != 0) return errno.fromInt(rc);
3673}
3674pub fn pthread_rwlock_tryrdlock(rwlock: *pthread_rwlock_t) !void {
3675 const rc = libc.pthread_rwlock_tryrdlock(rwlock);
3676 if (rc != 0) return errno.fromInt(rc);
3677}
3678pub fn pthread_rwlock_wrlock(rwlock: *pthread_rwlock_t) !void {
3679 const rc = libc.pthread_rwlock_wrlock(rwlock);
3680 if (rc != 0) return errno.fromInt(rc);
3681}
3682pub fn pthread_rwlock_trywrlock(rwlock: *pthread_rwlock_t) !void {
3683 const rc = libc.pthread_rwlock_trywrlock(rwlock);
3684 if (rc != 0) return errno.fromInt(rc);
3685}
3686pub fn pthread_rwlock_unlock(rwlock: *pthread_rwlock_t) !void {
3687 const rc = libc.pthread_rwlock_unlock(rwlock);
3688 if (rc != 0) return errno.fromInt(rc);
3689}
3690pub fn pipe2(flag: c_int) ![2]c_int {3574pub fn pipe2(flag: c_int) ![2]c_int {
3691 var fildes: [2]c_int = @splat(-1);3575 var fildes: [2]c_int = @splat(-1);
3692 const rc = libc.pipe2(&fildes, flag);3576 const rc = libc.pipe2(&fildes, flag);