authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-12-18 00:03:24 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-12-18 00:03:24 -08:00
logb909bdac4648a27c7a4cde2cb991d90221a36949
tree5c9f39115b0b326e0c44f417588005246efb1170
parent8b430df52d95956e12163ff976af7fda6712a341

add gettid


2 files changed, 6 insertions(+), 0 deletions(-)

mod.zig+5
......@@ -1388,6 +1388,7 @@ pub const libc = struct {
13881388 //
13891389
13901390 pub extern fn __errno_location() *c_int;
1391 pub extern fn gettid() pid_t;
13911392};
13921393
13931394pub const clock_t = c_long;
......@@ -1533,3 +1534,7 @@ pub fn mkdirat(fd: c_int, path: [*:0]const u8, mode: mode_t) errno.Error!void {
15331534pub fn pthread_self() pthread_t {
15341535 return libc.pthread_self();
15351536}
1537
1538pub fn gettid() pid_t {
1539 return libc.gettid();
1540}
test.zig+1
......@@ -14,4 +14,5 @@ test {
1414 _ = &linux.readv;
1515 _ = &linux.mkdirat;
1616 _ = &linux.pthread_self;
17 _ = &linux.gettid;
1718}