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 @@ -1750,6 +1750,12 @@ sysctl
17501750sysctlbyname
17511751sysctlnametomib
17521752telldir
1753+ timer_create
1754+ timer_delete
1755+ timer_getoverrun
1756+ timer_gettime
1757+ timer_settime
1758+ timer_t
17531759timex
17541760truncate
17551761ttyname_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 ;
@@ -249,6 +250,15 @@ s! {
249250 envv: * mut :: c_void,
250251 core: :: uintptr_t,
251252 }
253+
254+ pub struct itimerspec {
255+ pub it_interval: :: timespec,
256+ pub it_value: :: timespec,
257+ }
258+
259+ pub struct __c_anonymous__timer {
260+ _priv: [ :: c_int; 3 ] ,
261+ }
252262}
253263
254264s_no_extra_traits ! {
@@ -1953,6 +1963,20 @@ extern "C" {
19531963 pub fn procstat_close ( procstat : * mut procstat ) ;
19541964}
19551965
1966+ #[ link( name = "rt" ) ]
1967+ extern "C" {
1968+ pub fn timer_create ( clock_id : clockid_t , evp : * mut sigevent , timerid : * mut timer_t ) -> :: c_int ;
1969+ pub fn timer_delete ( timerid : timer_t ) -> :: c_int ;
1970+ pub fn timer_getoverrun ( timerid : timer_t ) -> :: c_int ;
1971+ pub fn timer_gettime ( timerid : timer_t , value : * mut itimerspec ) -> :: c_int ;
1972+ pub fn timer_settime (
1973+ timerid : timer_t ,
1974+ flags : :: c_int ,
1975+ value : * const itimerspec ,
1976+ ovalue : * mut itimerspec ,
1977+ ) -> :: c_int ;
1978+ }
1979+
19561980cfg_if ! {
19571981 if #[ cfg( freebsd13) ] {
19581982 mod freebsd13;
You can’t perform that action at this time.
0 commit comments