From 10a64fb6c0d7e628cac9d0b41466b93fbd52d191 Mon Sep 17 00:00:00 2001 From: DC Date: Sun, 3 Oct 2021 11:48:21 +0100 Subject: [PATCH] solarish add thr_self fn --- libc-test/build.rs | 1 + src/unix/solarish/mod.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 719249a90abbf..c9d4368b19dbf 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -784,6 +784,7 @@ fn test_solarish(target: &str) { "sys/wait.h", "syslog.h", "termios.h", + "thread.h", "time.h", "ucontext.h", "unistd.h", diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 67147ea4a3e35..6c83871be0de6 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -35,6 +35,7 @@ pub type socklen_t = ::c_uint; pub type sa_family_t = u16; pub type pthread_t = ::c_uint; pub type pthread_key_t = ::c_uint; +pub type thread_t = ::c_uint; pub type blksize_t = ::c_int; pub type nl_item = ::c_int; pub type mqd_t = *mut ::c_void; @@ -2594,6 +2595,7 @@ extern "C" { buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int; + pub fn thr_self() -> ::thread_t; pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; pub fn getgrnam(name: *const ::c_char) -> *mut ::group;