Skip to content

Commit

Permalink
[illumos] add pthread stack functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Aug 12, 2024
1 parent 0627e14 commit 80d43bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/illumos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pthread_attr_get_np
pthread_attr_getstackaddr
pthread_attr_setstack
15 changes: 15 additions & 0 deletions src/unix/solarish/illumos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80d43bf

Please sign in to comment.