File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/unix/bsd/freebsdlike/freebsd Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1748,6 +1748,12 @@ sysctl
17481748sysctlbyname
17491749sysctlnametomib
17501750telldir
1751+ timer_create
1752+ timer_delete
1753+ timer_getoverrun
1754+ timer_gettime
1755+ timer_settime
1756+ timer_t
17511757timex
17521758truncate
17531759ttyname_r
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ pub type lwpid_t = i32;
55pub type blksize_t = i32 ;
66pub type clockid_t = :: c_int ;
77pub type sem_t = _sem ;
8+ pub type timer_t = * mut __c_anonymous__timer ;
89
910pub type fsblkcnt_t = u64 ;
1011pub type fsfilcnt_t = u64 ;
@@ -238,6 +239,15 @@ s! {
238239 envv: * mut :: c_void,
239240 core: :: uintptr_t,
240241 }
242+
243+ pub struct itimerspec {
244+ pub it_interval: :: timespec,
245+ pub it_value: :: timespec,
246+ }
247+
248+ pub struct __c_anonymous__timer {
249+ _priv: [ :: c_int; 3 ] ,
250+ }
241251}
242252
243253s_no_extra_traits ! {
@@ -1938,6 +1948,20 @@ extern "C" {
19381948 pub fn procstat_close ( procstat : * mut procstat ) ;
19391949}
19401950
1951+ #[ link( name = "rt" ) ]
1952+ extern "C" {
1953+ pub fn timer_create ( clock_id : clockid_t , evp : * mut sigevent , timerid : * mut timer_t ) -> :: c_int ;
1954+ pub fn timer_delete ( timerid : timer_t ) -> :: c_int ;
1955+ pub fn timer_getoverrun ( timerid : timer_t ) -> :: c_int ;
1956+ pub fn timer_gettime ( timerid : timer_t , value : * mut itimerspec ) -> :: c_int ;
1957+ pub fn timer_settime (
1958+ timerid : timer_t ,
1959+ flags : :: c_int ,
1960+ value : * const itimerspec ,
1961+ ovalue : * mut itimerspec ,
1962+ ) -> :: c_int ;
1963+ }
1964+
19411965cfg_if ! {
19421966 if #[ cfg( freebsd13) ] {
19431967 mod freebsd13;
You can’t perform that action at this time.
0 commit comments