From 80d43bf020792098497a94d0ff1c9ef30e8bdf05 Mon Sep 17 00:00:00 2001 From: Rain Date: Wed, 31 Jul 2024 15:25:40 -0700 Subject: [PATCH] [illumos] add pthread stack functions --- libc-test/semver/illumos.txt | 3 +++ src/unix/solarish/illumos.rs | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 libc-test/semver/illumos.txt diff --git a/libc-test/semver/illumos.txt b/libc-test/semver/illumos.txt new file mode 100644 index 0000000000000..d0ef608456d54 --- /dev/null +++ b/libc-test/semver/illumos.txt @@ -0,0 +1,3 @@ +pthread_attr_get_np +pthread_attr_getstackaddr +pthread_attr_setstack diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index 404f013da2f98..ef3862ee41b34 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -81,6 +81,21 @@ extern "C" { ) -> ::c_int; pub fn pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int; + pub fn pthread_attr_get_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_getstackaddr( + attr: *const ::pthread_attr_t, + stackaddr: *mut *mut ::c_void, + ) -> ::c_int; + pub fn pthread_attr_setstack( + attr: *mut ::pthread_attr_t, + stackaddr: *mut ::c_void, + stacksize: ::size_t, + ) -> ::c_int; + pub fn pthread_attr_setstackaddr( + attr: *mut ::pthread_attr_t, + stackaddr: *mut ::c_void, + ) -> ::c_int; + pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t;