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
1748
1748
sysctlbyname
1749
1749
sysctlnametomib
1750
1750
telldir
1751
+ timer_create
1752
+ timer_delete
1753
+ timer_getoverrun
1754
+ timer_gettime
1755
+ timer_settime
1756
+ timer_t
1751
1757
timex
1752
1758
truncate
1753
1759
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 ;
@@ -238,6 +239,15 @@ s! {
238
239
envv: * mut :: c_void,
239
240
core: :: uintptr_t,
240
241
}
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
+ }
241
251
}
242
252
243
253
s_no_extra_traits ! {
@@ -1938,6 +1948,20 @@ extern "C" {
1938
1948
pub fn procstat_close ( procstat : * mut procstat ) ;
1939
1949
}
1940
1950
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
+
1941
1965
cfg_if ! {
1942
1966
if #[ cfg( freebsd13) ] {
1943
1967
mod freebsd13;
You can’t perform that action at this time.
0 commit comments