Skip to content

Commit f069c8d

Browse files
committed
adding new illumos ptsname_r call.
while at it, fixing PTHREAD_MUTEX_DEFAULT which differs from solaris.
1 parent 72cb7aa commit f069c8d

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

libc-test/semver/illumos.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pthread_attr_get_np
22
pthread_attr_getstackaddr
33
pthread_attr_setstack
4+
ptsname_r

src/unix/solarish/illumos.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ pub const B4000000: ::speed_t = 31;
6868
// sys/systeminfo.h
6969
pub const SI_ADDRESS_WIDTH: ::c_int = 520;
7070

71+
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 8;
72+
7173
extern "C" {
7274
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
7375

@@ -100,4 +102,6 @@ extern "C" {
100102
pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t)
101103
-> ::ssize_t;
102104
pub fn getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int;
105+
106+
pub fn ptsname_r(fildes: ::c_int, name: *mut ::c_char, namelen: ::size_t) -> ::c_int;
103107
}

src/unix/solarish/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2154,7 +2154,6 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
21542154
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
21552155
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
21562156
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4;
2157-
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
21582157

21592158
pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
21602159
pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;

src/unix/solarish/solaris.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ pub const F_DUPFD_CLOFORK: ::c_int = 49;
6565
pub const F_DUP2FD_CLOEXEC: ::c_int = 48;
6666
pub const F_DUP2FD_CLOFORK: ::c_int = 50;
6767

68+
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = ::PTHREAD_MUTEX_NORMAL;
69+
6870
extern "C" {
6971
pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int;
7072

0 commit comments

Comments
 (0)