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
1750
1750
sysctlbyname
1751
1751
sysctlnametomib
1752
1752
telldir
1753
+ timer_create
1754
+ timer_delete
1755
+ timer_getoverrun
1756
+ timer_gettime
1757
+ timer_settime
1758
+ timer_t
1753
1759
timex
1754
1760
truncate
1755
1761
ttyname_r
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ pub type lwpid_t = i32;
5
5
pub type blksize_t = i32 ;
6
6
pub type clockid_t = :: c_int ;
7
7
pub type sem_t = _sem ;
8
+ pub type timer_t = * mut __c_anonymous__timer ;
8
9
9
10
pub type fsblkcnt_t = u64 ;
10
11
pub type fsfilcnt_t = u64 ;
@@ -249,6 +250,15 @@ s! {
249
250
envv: * mut :: c_void,
250
251
core: :: uintptr_t,
251
252
}
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
+ }
252
262
}
253
263
254
264
s_no_extra_traits ! {
@@ -1953,6 +1963,20 @@ extern "C" {
1953
1963
pub fn procstat_close ( procstat : * mut procstat ) ;
1954
1964
}
1955
1965
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
+
1956
1980
cfg_if ! {
1957
1981
if #[ cfg( freebsd13) ] {
1958
1982
mod freebsd13;
You can’t perform that action at this time.
0 commit comments