Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libc-test/semver/illumos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ TFD_CLOEXEC
TFD_NONBLOCK
TFD_TIMER_ABSTIME
TFD_TIMER_CANCEL_ON_SET
TIME_ACTIVE
TIME_MONOTONIC
TIME_THREAD_ACTIVE
TIME_THREAD_ACTIVE_USR
TIME_UTC
_CS_PATH
execl
execle
Expand All @@ -49,3 +54,5 @@ system
timerfd_create
timerfd_gettime
timerfd_settime
timespec_get
timespec_getres
10 changes: 10 additions & 0 deletions libc-test/semver/solarish.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
AIO_ALLDONE
AIO_CANCELED
AIO_NOTCANCELED
CLOCK_HIGHRES
CLOCK_PROCESS_CPUTIME_ID
CLOCK_PROF
CLOCK_THREAD_CPUTIME_ID
CLOCK_VIRTUAL
IPV6_BOUND_IF
IPV6_DONTFRAG
IPV6_HOPLIMIT
Expand All @@ -14,6 +17,10 @@ IP_DONTFRAG
IP_PKTINFO
IP_TOS
IP_TTL
ITIMER_PROF
ITIMER_REAL
ITIMER_REALPROF
ITIMER_VIRTUAL
LIO_NOP
LIO_NOWAIT
LIO_READ
Expand Down Expand Up @@ -56,6 +63,7 @@ execv
execve
execvp
fork
getitimer
in6_pktinfo
in_pktinfo
lio_listio
Expand Down Expand Up @@ -88,7 +96,9 @@ posix_spawnattr_setsigmask
posix_spawnp
recvmsg
sendmsg
setitimer
sigqueue
strftime
strftime_l
strptime
system
10 changes: 10 additions & 0 deletions src/unix/solarish/illumos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ pub const TFD_NONBLOCK: i32 = 0o4000;
pub const TFD_TIMER_ABSTIME: i32 = 1 << 0;
pub const TFD_TIMER_CANCEL_ON_SET: i32 = 1 << 1;

// time.h
pub const TIME_UTC: c_int = 0x1;
pub const TIME_MONOTONIC: c_int = 0x2;
pub const TIME_ACTIVE: c_int = 0x3;
pub const TIME_THREAD_ACTIVE: c_int = 0x4;
pub const TIME_THREAD_ACTIVE_USR: c_int = 0x5;

extern "C" {
pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;

Expand Down Expand Up @@ -303,6 +310,9 @@ extern "C" {
loc: crate::locale_t,
) -> c_int;

pub fn timespec_get(ts: *mut crate::timespec, base: c_int) -> c_int;
pub fn timespec_getres(ts: *mut crate::timespec, base: c_int) -> c_int;

pub fn timerfd_create(clockid: c_int, flags: c_int) -> c_int;
pub fn timerfd_gettime(fd: c_int, curr_value: *mut crate::itimerspec) -> c_int;
pub fn timerfd_settime(
Expand Down
16 changes: 16 additions & 0 deletions src/unix/solarish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,9 +1324,18 @@ pub const CLOCK_REALTIME: crate::clockid_t = 3;
pub const CLOCK_MONOTONIC: crate::clockid_t = 4;
pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 5;
pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 2;
pub const CLOCK_VIRTUAL: crate::clockid_t = 1;
pub const CLOCK_HIGHRES: crate::clockid_t = CLOCK_MONOTONIC;
pub const CLOCK_PROF: crate::clockid_t = CLOCK_THREAD_CPUTIME_ID;
pub const TIMER_RELTIME: c_int = 0;
pub const TIMER_ABSTIME: c_int = 1;

// sys/time.h
pub const ITIMER_REAL: c_int = 0;
pub const ITIMER_VIRTUAL: c_int = 1;
pub const ITIMER_PROF: c_int = 2;
pub const ITIMER_REALPROF: c_int = 3;

pub const RLIMIT_CPU: c_int = 0;
pub const RLIMIT_FSIZE: c_int = 1;
pub const RLIMIT_DATA: c_int = 2;
Expand Down Expand Up @@ -2401,6 +2410,13 @@ extern "C" {
rmtp: *mut crate::timespec,
) -> c_int;
pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int;
pub fn getitimer(which: c_int, curr_value: *mut crate::itimerval) -> c_int;
pub fn setitimer(
which: c_int,
new_value: *const crate::itimerval,
old_value: *mut crate::itimerval,
) -> c_int;
pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char;
pub fn getnameinfo(
sa: *const crate::sockaddr,
salen: crate::socklen_t,
Expand Down
Loading